src/CMakeLists.txt

Sun, 07 Feb 2021 12:27:21 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 07 Feb 2021 12:27:21 +0100
changeset 392
c195c33de85d
parent 391
f094a53c1178
child 398
8d506ed6c1c0
permissions
-rw-r--r--

add at least a cxFree() call, even if we can't test it

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
460c0258bb5b adds proper cmake build targets
Mike Becker <universe@uap-core.de>
parents:
diff changeset
4 )
377
2099a3aff61e adds install target for cmake builds
Mike Becker <universe@uap-core.de>
parents: 375
diff changeset
5 set(headers
391
f094a53c1178 adds allocator interface and default implementation
Mike Becker <universe@uap-core.de>
parents: 390
diff changeset
6 cx/allocator.h
390
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents: 377
diff changeset
7 cx/list.h
377
2099a3aff61e adds install target for cmake builds
Mike Becker <universe@uap-core.de>
parents: 375
diff changeset
8 )
375
460c0258bb5b adds proper cmake build targets
Mike Becker <universe@uap-core.de>
parents:
diff changeset
9
460c0258bb5b adds proper cmake build targets
Mike Becker <universe@uap-core.de>
parents:
diff changeset
10 add_library(ucx SHARED ${sources})
460c0258bb5b adds proper cmake build targets
Mike Becker <universe@uap-core.de>
parents:
diff changeset
11 add_library(ucx_static STATIC ${sources})
460c0258bb5b adds proper cmake build targets
Mike Becker <universe@uap-core.de>
parents:
diff changeset
12
460c0258bb5b adds proper cmake build targets
Mike Becker <universe@uap-core.de>
parents:
diff changeset
13 target_include_directories(ucx PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
460c0258bb5b adds proper cmake build targets
Mike Becker <universe@uap-core.de>
parents:
diff changeset
14 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
15
390
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents: 377
diff changeset
16 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
17 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
18
2099a3aff61e adds install target for cmake builds
Mike Becker <universe@uap-core.de>
parents: 375
diff changeset
19 # 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
20 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
21
2099a3aff61e adds install target for cmake builds
Mike Becker <universe@uap-core.de>
parents: 375
diff changeset
22 include(GNUInstallDirs)
2099a3aff61e adds install target for cmake builds
Mike Becker <universe@uap-core.de>
parents: 375
diff changeset
23 install(TARGETS ucx ucx_static
2099a3aff61e adds install target for cmake builds
Mike Becker <universe@uap-core.de>
parents: 375
diff changeset
24 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
2099a3aff61e adds install target for cmake builds
Mike Becker <universe@uap-core.de>
parents: 375
diff changeset
25 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
2099a3aff61e adds install target for cmake builds
Mike Becker <universe@uap-core.de>
parents: 375
diff changeset
26 PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ucx)

mercurial