-
Notifications
You must be signed in to change notification settings - Fork 82
/
CMakeLists.txt
47 lines (39 loc) · 1.61 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_usbcsink3 LANGUAGES MikroC)
else()
project(example_usbcsink3 LANGUAGES C ASM)
endif()
include(mikroeUtils)
if (NOT PROJECT_TYPE)
set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
endif()
add_executable(example_usbcsink3
example/main.c
)
############################ example_usbcsink3 GENERATED CODE START ###########################
find_package(MikroC.Core REQUIRED)
target_link_libraries(example_usbcsink3 PUBLIC MikroC.Core)
find_package(MikroSDK.Board REQUIRED)
target_link_libraries(example_usbcsink3 PUBLIC MikroSDK.Board)
find_package(MikroSDK.Log REQUIRED)
target_link_libraries(example_usbcsink3 PUBLIC MikroSDK.Log)
add_subdirectory(lib_usbcsink3)
target_link_libraries(example_usbcsink3 PUBLIC Click.USBCSink3)
############################ example_usbcsink3 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()