aboutsummaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
blob: 98fe5259b6d62c37cc1de07a77d5034f73af3985 (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
set (jaucpp_LIB_INCLUDE_DIRS
  ${PROJECT_SOURCE_DIR}/include
)

include_directories(
  ${jaucpp_LIB_INCLUDE_DIRS}
  ${CMAKE_CURRENT_BINARY_DIR}
)

set (jaucpp_LIB_SRCS
  ${PROJECT_SOURCE_DIR}/src/dfa_utf8_decode.cpp
  ${PROJECT_SOURCE_DIR}/src/environment.cpp
  ${PROJECT_SOURCE_DIR}/src/debug.cpp
  ${PROJECT_SOURCE_DIR}/src/basic_types.cpp
# autogenerated files
  ${CMAKE_CURRENT_BINARY_DIR}/version.cpp
)

add_library (jaucpp SHARED ${jaucpp_LIB_SRCS})
target_link_libraries (
  jaucpp
  unwind
  ${CMAKE_THREAD_LIBS_INIT}
)

set_target_properties(
   jaucpp
   PROPERTIES
   SOVERSION ${jaucpp_VERSION_MAJOR}
   VERSION ${jaucpp_VERSION_STRING}
   CXX_STANDARD 17
   CXX_STANDARD_REQUIRED ON
   COMPILE_FLAGS "-Wall -Wextra -Werror"
)
install (DIRECTORY ${PROJECT_SOURCE_DIR}/include/jau/ DESTINATION include/jau)

install(TARGETS jaucpp LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})