-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathCMakeLists.txt
35 lines (31 loc) · 1.06 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 2.8.3)
project(crossdb)
add_compile_options(-O2)
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
add_library(crossdb src/crossdb.c)
add_executable(xdb-cli src/xdb-cli.c)
target_link_libraries(xdb-cli pthread dl)
set_target_properties(crossdb PROPERTIES PUBLIC_HEADER "include/crossdb.h")
#add_subdirectory(jni)
INSTALL(
TARGETS xdb-cli crossdb
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
PUBLIC_HEADER DESTINATION include
)
add_custom_target("uninstall" COMMENT "Uninstall installed files")
add_custom_command(
TARGET "uninstall"
POST_BUILD
COMMENT "Uninstall files with install_manifest.txt"
COMMAND xargs rm -vf < install_manifest.txt || echo Nothing in
install_manifest.txt to be uninstalled!
)
set(CPACK_PACKAGE_NAME crossdb)
set(CPACK_PACKAGE_VERSION_MAJOR 0)
set(CPACK_PACKAGE_VERSION_MINOR 8)
set(CPACK_PACKAGE_VERSION_PATCH 0)
set(CPACK_PACKAGE_CONTACT "crossdb <[email protected]>")
#set(CPACK_GENERATOR DEB)
#set(CPACK_GENERATOR DEB NSIS RPM)
#include(CPack)