]> git.mxchange.org Git - simgear.git/blobdiff - CMakeLists.txt
New accessors for variant support.
[simgear.git] / CMakeLists.txt
index 9ae509e2c512d614b4f8c467dff29606378e53df..f7220c5734a71523795c26e64c95c0d61df51a5e 100644 (file)
@@ -116,6 +116,7 @@ option(ENABLE_RTI       "Set to ON to build SimGear with RTI support" OFF)
 option(ENABLE_TESTS     "Set to OFF to disable building SimGear's test applications" ON)
 option(ENABLE_SOUND     "Set to OFF to disable building SimGear's sound support" ON)
 option(ENABLE_PKGUTIL   "Set to ON to build the sg_pkgutil application (default)" ON)
+option(ENABLE_CURL      "Set to ON to use libCurl as the HTTP client backend" OFF)
 
 if (MSVC)
   GET_FILENAME_COMPONENT(PARENT_DIR ${PROJECT_BINARY_DIR} PATH)
@@ -173,6 +174,11 @@ endif (MSVC AND MSVC_3RDPARTY_ROOT)
 
 if(APPLE)
   find_library(COCOA_LIBRARY Cocoa)
+
+# this should be handled by setting CMAKE_OSX_DEPLOYMENT_TARGET
+# but it's not working reliably, so forcing it for now
+  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7")
+  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.7")
 endif()
 
 if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR
@@ -203,6 +209,11 @@ endif(SIMGEAR_HEADLESS)
 
 find_package(ZLIB REQUIRED)
 
+if (ENABLE_CURL)
+  find_package(CURL REQUIRED)
+  message(STATUS "Curl HTTP client: ENABLED")
+endif()
+
 if (SYSTEM_EXPAT)
     message(STATUS "Requested to use system Expat library, forcing SIMGEAR_SHARED to true")
     set(SIMGEAR_SHARED ON)
@@ -368,6 +379,7 @@ include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
     ${ZLIB_INCLUDE_DIR}
     ${OPENAL_INCLUDE_DIR}
+    ${CURL_INCLUDE_DIRS}
 )
 
 add_definitions(-DHAVE_CONFIG_H)
@@ -396,7 +408,8 @@ set(TEST_LIBS_INTERNAL_CORE
     ${WINSOCK_LIBRARY}
     ${RT_LIBRARY}
     ${DL_LIBRARY}
-    ${COCOA_LIBRARY})
+    ${COCOA_LIBRARY}
+    ${CURL_LIBRARIES})
 set(TEST_LIBS SimGearCore ${TEST_LIBS_INTERNAL_CORE})
 
 if(NOT SIMGEAR_HEADLESS)