-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
46 lines (37 loc) · 1.29 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
45
46
cmake_minimum_required (VERSION 3.8)
project (crsync C)
set(CMAKE_VERBOSE_MAKEFILE ON)
set(crsync_VERSION_MAJOR 0)
set(crsync_VERSION_MINOR 3)
set(crsync_VERSION_PATCH 0)
set_property(GLOBAL PROPERTY USE_FOLDERS TRUE)
#Put all binaries in same location
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY bin)
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY bin)
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY bin)
add_subdirectory(libs)
add_subdirectory(extra)
add_subdirectory(src)
add_definitions("-DHASH_BLOOM=21")
set(CMAKE_C_STANDARD 99)
# add_definitions("CURL_STATICLIB")
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os")
include_directories(${CURL_HEADER_PATH})
include_directories(${EXTRA_HEADER_PATH})
#link_directories(${CURL_LIB_PATH})
#link_directories(${OPENSSL_LIB_PATH})
find_package(OpenMP)
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
add_executable(crsync ${SOURCES} ${HEADERS} ${CURL_HEADERS} ${EXTRA_SOURCES} ${EXTRA_HEADERS})
target_link_libraries(
crsync
"${CURL_LIB}"
"${OPENSSL_LIB}"
)
source_group("curl_inc" FILES ${CURL_HEADERS})
source_group("extra_inc" FILES ${EXTRA_HEADERS})
source_group("extra_src" FILES ${EXTRA_SOURCES})