aboutsummaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
blob: 6eb11f39ba72cbf190205c64c9b76f6d4836f322 (plain)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
set (jaulib_LIB_INCLUDE_DIRS
  ${CMAKE_CURRENT_SOURCE_DIR}/../include
)

include_directories(
  ${jaulib_LIB_INCLUDE_DIRS}
  ${CMAKE_CURRENT_BINARY_DIR}
  ${SYS_INCLUDE_DIRS}
)

set (jaulib_LIB_SRCS
  dfa_utf8_decode.cpp
  environment.cpp
  cpuid.cpp
  debug.cpp
  basic_types.cpp
  base_codec.cpp
  byte_stream.cpp
  eui48.cpp
  file_util.cpp
  io_util.cpp
  uuid.cpp
  service_runner.cpp
  simple_timer.cpp
# autogenerated files
  ${CMAKE_CURRENT_BINARY_DIR}/version.cpp
)

add_library (jaulib SHARED ${jaulib_LIB_SRCS})
target_link_libraries (
  jaulib
  ${LIBCURL_LIBNAME}
  ${LIBUNWIND_LIBNAME}
  ${CMAKE_THREAD_LIBS_INIT}
)

if(USE_STRIP)
add_custom_command(TARGET jaulib POST_BUILD
                   COMMAND ${STRIP} ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}jaulib${CMAKE_SHARED_LIBRARY_SUFFIX}.${jaulib_VERSION_SHORT}
                   COMMENT "stripping jaulib"
                   VERBATIM
                   )
endif(USE_STRIP)

set_target_properties(
   jaulib
   PROPERTIES
   SOVERSION ${jaulib_VERSION_MAJOR}
   VERSION ${jaulib_VERSION_SHORT}
)
install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../include/jau/ DESTINATION include/jau)

install(TARGETS jaulib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})