src/CMakeLists.txt

changeset 377
2099a3aff61e
parent 375
460c0258bb5b
child 390
d345541018fa
     1.1 --- a/src/CMakeLists.txt	Fri Dec 20 14:44:50 2019 +0100
     1.2 +++ b/src/CMakeLists.txt	Fri Dec 27 11:48:55 2019 +0100
     1.3 @@ -14,6 +14,22 @@
     1.4          ucx.c
     1.5          utils.c
     1.6  )
     1.7 +set(headers
     1.8 +        ucx/allocator.h
     1.9 +        ucx/array.h
    1.10 +        ucx/avl.h
    1.11 +        ucx/buffer.h
    1.12 +        ucx/list.h
    1.13 +        ucx/logging.h
    1.14 +        ucx/map.h
    1.15 +        ucx/mempool.h
    1.16 +        ucx/properties.h
    1.17 +        ucx/stack.h
    1.18 +        ucx/string.h
    1.19 +        ucx/test.h
    1.20 +        ucx/ucx.h
    1.21 +        ucx/utils.h
    1.22 +)
    1.23  
    1.24  add_library(ucx SHARED ${sources})
    1.25  add_library(ucx_static STATIC ${sources})
    1.26 @@ -23,3 +39,12 @@
    1.27  
    1.28  set_target_properties(ucx PROPERTIES SOVERSION 3 VERSION 3.1.0)
    1.29  set_target_properties(ucx_static PROPERTIES VERSION ${CMAKE_PROJECT_VERSION})
    1.30 +
    1.31 +# it is sufficient to specify the headers for one of the targets
    1.32 +set_target_properties(ucx PROPERTIES PUBLIC_HEADER "${headers}")
    1.33 +
    1.34 +include(GNUInstallDirs)
    1.35 +install(TARGETS ucx ucx_static
    1.36 +        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    1.37 +        ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
    1.38 +        PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ucx)
    1.39 \ No newline at end of file

mercurial