-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
44 lines (33 loc) · 1.21 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
36
37
38
39
40
41
42
43
44
# clipsync cmake configuration file
cmake_minimum_required(VERSION 2.8)
project(clipsync)
# Set a default build type if none was specified
set(default_build_type "Release")
# Source files
set(SOURCE
src/clipsync.c
src/cb.c
src/murmur3.c
src/util.c
)
# Set the output directory
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
include_directories(${PROJECT_SOURCE_DIR}/libs/libclipboard/include)
include_directories(${CMAKE_BINARY_DIR}/libs/libclipboard/include)
add_executable(clipsync ${SOURCE})
# Depends on libclipboard
add_subdirectory(libs/libclipboard)
add_dependencies(clipsync clipboard)
target_link_libraries(clipsync clipboard)
# Depends on libsodium
set(sodium_USE_STATIC_LIBS TRUE)
include("${PROJECT_SOURCE_DIR}/cmake/Findsodium.cmake")
target_link_libraries(clipsync sodium)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
add_executable(cb_stress_test tools/stress_test.c src/cb.c src/murmur3.c src/util.c)
target_link_libraries(cb_stress_test clipboard)
target_link_libraries(cb_stress_test sodium)
target_compile_options(clipsync PRIVATE -Wall -pedantic)
target_compile_options(cb_stress_test PRIVATE -Wall -pedantic)
endif()
install(TARGETS clipsync DESTINATION bin)