-
Notifications
You must be signed in to change notification settings - Fork 82
/
CMakeLists.txt
47 lines (39 loc) · 1.59 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
cmake_minimum_required(VERSION 3.21)
if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
project(example_micrfrx LANGUAGES MikroC)
else()
project(example_micrfrx LANGUAGES C ASM)
endif()
include(mikroeUtils)
if (NOT PROJECT_TYPE)
set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
endif()
add_executable(example_micrfrx
example/main.c
)
############################ example_micrfrx GENERATED CODE START ###########################
find_package(MikroC.Core REQUIRED)
target_link_libraries(example_micrfrx PUBLIC MikroC.Core)
find_package(MikroSDK.Board REQUIRED)
target_link_libraries(example_micrfrx PUBLIC MikroSDK.Board)
find_package(MikroSDK.Log REQUIRED)
target_link_libraries(example_micrfrx PUBLIC MikroSDK.Log)
add_subdirectory(lib_micrfrx)
target_link_libraries(example_micrfrx PUBLIC Click.MICRFRX)
############################ example_micrfrx GENERATED CODE END ###########################
if(COMPILER_REVISION)
if(${COMPILER_REVISION} VERSION_GREATER_EQUAL "1.0")
if(${TOOLCHAIN_LANGUAGE} STREQUAL "GNU")
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.meproject)
fetch_startup_name(${CMAKE_CURRENT_SOURCE_DIR}/.meproject startupName)
if(startupName)
add_startup_all_targets(. ${CMAKE_CURRENT_SOURCE_DIR} ${startupName})
endif()
fetch_linker_name(${CMAKE_CURRENT_SOURCE_DIR}/.meproject linkerName)
if(linkerName)
add_ld_all_targets(. ${CMAKE_CURRENT_SOURCE_DIR} ${linkerName})
endif()
endif()
endif()
endif()
endif()