0
|
1 # Mini-project to check whether "PalantirCppClient" can compile in a
|
|
2 # standalone fashion
|
|
3
|
|
4 cmake_minimum_required(VERSION 2.8)
|
|
5
|
|
6 project(PalantirCppClientTest)
|
|
7
|
|
8 SET(STATIC_BUILD OFF)
|
|
9
|
|
10 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DownloadPackage.cmake)
|
|
11 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/JsonCppConfiguration.cmake)
|
|
12 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/LibCurlConfiguration.cmake)
|
|
13
|
|
14 if (${CMAKE_COMPILER_IS_GNUCXX})
|
|
15 set(CMAKE_C_FLAGS "-Wall -pedantic -Wno-implicit-function-declaration") # --std=c99 makes libcurl not to compile
|
|
16 set(CMAKE_CXX_FLAGS "-Wall -pedantic -Wno-long-long -Wno-variadic-macros")
|
|
17 set(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
|
|
18 set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
|
|
19 elseif (${MSVC})
|
|
20 add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
|
|
21 endif()
|
|
22
|
|
23 add_library(PalantirCppClient
|
|
24 SHARED
|
|
25
|
|
26 ${THIRD_PARTY_SOURCES}
|
|
27 HttpException.cpp
|
|
28 HttpClient.cpp
|
|
29 )
|
|
30
|
|
31 add_executable(Test
|
|
32 main.cpp
|
|
33 )
|
|
34
|
|
35 target_link_libraries(Test PalantirCppClient)
|