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