-
Notifications
You must be signed in to change notification settings - Fork 86
/
CMakeLists.txt
41 lines (28 loc) · 976 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
33
34
35
36
37
38
39
40
41
project(carlsim)
cmake_minimum_required(VERSION 3.0)
# Options
option(CARLSIM_NO_CUDA "Turn off CUDA support" OFF)
# Targets
add_library(carlsim SHARED carlsim/dummy.cpp)
# Properties
set_property(TARGET carlsim PROPERTY VERSION "4.0.0")
# Linking
# Combine archives into shared library using this macro
macro(link_archive name)
target_link_libraries(carlsim PUBLIC
-Wl,--whole-archive ${name} -Wl,--no-whole-archive
)
endmacro()
link_archive(carlsim-interface)
link_archive(carlsim-kernel)
link_archive(carlsim-monitor)
link_archive(carlsim-simple-weight-tuner)
link_archive(carlsim-spike-generators)
link_archive(carlsim-stopwatch)
link_archive(carlsim-visual-stimulus)
# Installation
install(TARGETS carlsim DESTINATION lib)
install(FILES cmake/carlsim-config.cmake DESTINATION lib/cmake/carlsim)
# Subdirectories
add_subdirectory(carlsim)
add_subdirectory(tools)