CMakeLists.txt 1.01 KB
Newer Older
1 2 3
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

set(tokuportability_srcs
4 5 6 7 8 9 10
  file
  memory
  os_malloc
  portability
  toku_assert
  toku_pthread
  toku_fair_rwlock
11 12 13 14 15
  )

add_library(${LIBTOKUPORTABILITY} SHARED ${tokuportability_srcs})
add_library(${LIBTOKUPORTABILITY}_static STATIC ${tokuportability_srcs})
maybe_add_gcov_to_libraries(${LIBTOKUPORTABILITY} ${LIBTOKUPORTABILITY}_static)
Leif Walsh's avatar
Leif Walsh committed
16
set_property(TARGET ${LIBTOKUPORTABILITY} ${LIBTOKUPORTABILITY}_static APPEND PROPERTY COMPILE_DEFINITIONS _GNU_SOURCE)
17
set_target_properties(${LIBTOKUPORTABILITY}_static PROPERTIES POSITION_INDEPENDENT_CODE ON)
18
target_link_libraries(${LIBTOKUPORTABILITY} LINK_PUBLIC ${CMAKE_THREAD_LIBS_INIT} ${EXTRA_SYSTEM_LIBS})
19

20
set_property(SOURCE file memory os_malloc portability toku_assert toku_rwlock APPEND PROPERTY
21
  COMPILE_DEFINITIONS TOKU_ALLOW_DEPRECATED=1)
22 23

install(
24
  FILES toku_os_types.h toku_time.h
25 26 27 28 29 30 31
  DESTINATION include
  )
install(
  TARGETS ${LIBTOKUPORTABILITY} ${LIBTOKUPORTABILITY}_static
  DESTINATION lib
  )

32
add_subdirectory(tests)