-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
47 lines (37 loc) · 1.64 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
47
cmake_minimum_required(VERSION 3.15.0)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Static runtime
cmake_policy(SET CMP0091 NEW)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded")
project(HercControl VERSION 1.1.1)
#include(CTest)
#enable_testing()
# Might as well share libraries on Ubuntu ...
# SET(CMAKE_EXE_LINKER_FLAGS "-static")
if(NOT APPLE)
option(CURL_STATICLIB "Set to ON to build libcurl with static linking." ON)
add_definitions("-DCURL_STATICLIB")
endif()
if(WIN32)
# On windows we will link static to help portability
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static")
endif()
option(HTTP_ONLY "disables all protocols except HTTP (This overrides all CURL_DISABLE_* options)" ON)
option(CMAKE_USE_LIBSSH2 "Use libSSH2" OFF)
option(CURL_ZLIB "Set to ON to enable building curl with zlib support." OFF)
set(CURL_CA_PATH "none" CACHE STRING
"Location of default CA path. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.")
option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" OFF)
option(BUILD_CPR_TESTS "Set to ON to build cpr tests." OFF)
option(BUILD_SHARED_LIBS "Build libraries as shared libraries" OFF)
configure_file(src/config.h.in include/config.h)
add_subdirectory(cpr)
add_executable(herccontrol src/HercControl.cpp)
target_link_libraries(herccontrol PUBLIC cpr)
target_include_directories(herccontrol PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/include)
target_include_directories(herccontrol PUBLIC rang/include)
target_include_directories(herccontrol PUBLIC CLI11/include)
#set(CPACK_PROJECT_NAME ${PROJECT_NAME})
#set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
#include(CPack)