src/CMakeLists.txt

Sun, 07 Feb 2021 20:37:20 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 07 Feb 2021 20:37:20 +0100
changeset 401
e6a8f7fb0c45
parent 398
8d506ed6c1c0
child 424
2d6f6cb24132
permissions
-rw-r--r--

copy list items when they are added to the list

375
460c0258bb5b adds proper cmake build targets
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 set(sources
391
f094a53c1178 adds allocator interface and default implementation
Mike Becker <universe@uap-core.de>
parents: 390
diff changeset
2 allocator.c
375
460c0258bb5b adds proper cmake build targets
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3 list.c
398
8d506ed6c1c0 adds first draft for linked list implementation
Mike Becker <universe@uap-core.de>
parents: 391
diff changeset
4 linked_list.c
375
460c0258bb5b adds proper cmake build targets
Mike Becker <universe@uap-core.de>
parents:
diff changeset
5 )
377
2099a3aff61e adds install target for cmake builds
Mike Becker <universe@uap-core.de>
parents: 375
diff changeset
6 set(headers
391
f094a53c1178 adds allocator interface and default implementation
Mike Becker <universe@uap-core.de>
parents: 390
diff changeset
7 cx/allocator.h
390
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents: 377
diff changeset
8 cx/list.h
398
8d506ed6c1c0 adds first draft for linked list implementation
Mike Becker <universe@uap-core.de>
parents: 391
diff changeset
9 cx/linked_list.h
377
2099a3aff61e adds install target for cmake builds
Mike Becker <universe@uap-core.de>
parents: 375
diff changeset
10 )
375
460c0258bb5b adds proper cmake build targets
Mike Becker <universe@uap-core.de>
parents:
diff changeset
11
460c0258bb5b adds proper cmake build targets
Mike Becker <universe@uap-core.de>
parents:
diff changeset
12 add_library(ucx SHARED ${sources})
460c0258bb5b adds proper cmake build targets
Mike Becker <universe@uap-core.de>
parents:
diff changeset
13 add_library(ucx_static STATIC ${sources})
460c0258bb5b adds proper cmake build targets
Mike Becker <universe@uap-core.de>
parents:
diff changeset
14
460c0258bb5b adds proper cmake build targets
Mike Becker <universe@uap-core.de>
parents:
diff changeset
15 target_include_directories(ucx PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
460c0258bb5b adds proper cmake build targets
Mike Becker <universe@uap-core.de>
parents:
diff changeset
16 target_include_directories(ucx_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
460c0258bb5b adds proper cmake build targets
Mike Becker <universe@uap-core.de>
parents:
diff changeset
17
390
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents: 377
diff changeset
18 set_target_properties(ucx PROPERTIES SOVERSION 4 VERSION 4.0.0)
375
460c0258bb5b adds proper cmake build targets
Mike Becker <universe@uap-core.de>
parents:
diff changeset
19 set_target_properties(ucx_static PROPERTIES VERSION ${CMAKE_PROJECT_VERSION})
377
2099a3aff61e adds install target for cmake builds
Mike Becker <universe@uap-core.de>
parents: 375
diff changeset
20
2099a3aff61e adds install target for cmake builds
Mike Becker <universe@uap-core.de>
parents: 375
diff changeset
21 # it is sufficient to specify the headers for one of the targets
2099a3aff61e adds install target for cmake builds
Mike Becker <universe@uap-core.de>
parents: 375
diff changeset
22 set_target_properties(ucx PROPERTIES PUBLIC_HEADER "${headers}")
2099a3aff61e adds install target for cmake builds
Mike Becker <universe@uap-core.de>
parents: 375
diff changeset
23
2099a3aff61e adds install target for cmake builds
Mike Becker <universe@uap-core.de>
parents: 375
diff changeset
24 include(GNUInstallDirs)
2099a3aff61e adds install target for cmake builds
Mike Becker <universe@uap-core.de>
parents: 375
diff changeset
25 install(TARGETS ucx ucx_static
2099a3aff61e adds install target for cmake builds
Mike Becker <universe@uap-core.de>
parents: 375
diff changeset
26 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
2099a3aff61e adds install target for cmake builds
Mike Becker <universe@uap-core.de>
parents: 375
diff changeset
27 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
2099a3aff61e adds install target for cmake builds
Mike Becker <universe@uap-core.de>
parents: 375
diff changeset
28 PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ucx)

mercurial