-
Notifications
You must be signed in to change notification settings - Fork 9
/
CMakeLists.txt
32 lines (25 loc) · 965 Bytes
/
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
cmake_minimum_required (VERSION 3.1)
project (rtlib)
#set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_BUILD_TYPE Release)
set(LIBRARY_TYPE STATIC)
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
add_definitions(-D__DEBUG__)
message("Debug added as a compilation flag")
endif()
# Import MetaSim
find_package(metasim REQUIRED)
get_target_property(metasim_INCLUDE_DIRS metasim INTERFACE_INCLUDE_DIRECTORIES)
if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
get_target_property(metasim_LIBRARIES metasim IMPORTED_LOCATION_RELEASE)
elseif (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
get_target_property(metasim_LIBRARIES metasim IMPORTED_LOCATION_DEBUG)
endif()
message("Metasim configuration file directory: ${metasim_DIR}")
message("Metasim include directory: ${metasim_INCLUDE_DIRS}")
message("Metasim library: ${metasim_LIBRARIES}")
# Include dirs
add_subdirectory (src)
add_subdirectory (examples)
enable_testing (true)
add_subdirectory (test)