view PalantirCppClient/CMakeLists.txt @ 34:96e57b863dd9

option to disallow remote access
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 30 Aug 2012 11:22:21 +0200
parents 3959d33612cc
children
line wrap: on
line source

# Mini-project to check whether "PalantirCppClient" can compile in a
# standalone fashion

cmake_minimum_required(VERSION 2.8)

project(PalantirCppClientTest)

SET(STATIC_BUILD OFF)

include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DownloadPackage.cmake)
include(${CMAKE_SOURCE_DIR}/../Resources/CMake/JsonCppConfiguration.cmake)
include(${CMAKE_SOURCE_DIR}/../Resources/CMake/LibCurlConfiguration.cmake)

if (${CMAKE_COMPILER_IS_GNUCXX})
  set(CMAKE_C_FLAGS "-Wall -pedantic -Wno-implicit-function-declaration")  # --std=c99 makes libcurl not to compile
  set(CMAKE_CXX_FLAGS "-Wall -pedantic -Wno-long-long -Wno-variadic-macros")
  set(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
  set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
elseif (${MSVC})
  add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)  
endif()

add_library(PalantirCppClient
  SHARED

  ${THIRD_PARTY_SOURCES}
  HttpException.cpp
  HttpClient.cpp
  )

add_executable(Test
  main.cpp
  )

target_link_libraries(Test PalantirCppClient)