]> git.mxchange.org Git - flightgear.git/blobdiff - CMakeModules/FindSimGear.cmake
Initial work for a PKG http service
[flightgear.git] / CMakeModules / FindSimGear.cmake
index 47ce3ca30b2eba8228e729e2c29ebf2ed132b32e..1cadbe201a893c3b004f552f41674d0401fe9e6b 100644 (file)
@@ -4,7 +4,7 @@
 # SIMGEAR_CORE_LIBRARIES, a list of the core static libraries
 # SIMGEAR_LIBRARIES, a list of all the static libraries (core + scene)
 # SIMGEAR_FOUND, if false, do not try to link to SimGear
-# SIMGEAR_INCLUDE_DIR, where to find the headers
+# SIMGEAR_INCLUDE_DIRS, where to find the headers
 #
 # $SIMGEAR_DIR is an environment variable that would
 # correspond to the ./configure --prefix=$SIMGEAR_DIR
@@ -146,12 +146,16 @@ else(SIMGEAR_SHARED)
     set(SIMGEAR_CORE_LIBRARY_DEPENDENCIES
         ${CMAKE_THREAD_LIBS_INIT}
         ${ZLIB_LIBRARY}
-        ${LIBSVN_LIBRARIES}
         ${WINMM_LIBRARY})
 
     set(SIMGEAR_SCENE_LIBRARY_DEPENDENCIES 
         ${OPENAL_LIBRARY})
 
+    if(APPLE)
+        find_library(COCOA_LIBRARY Cocoa)
+        list(APPEND SIMGEAR_CORE_LIBRARY_DEPENDENCIES ${COCOA_LIBRARY})
+    endif()
+
     if(WIN32)
         list(APPEND SIMGEAR_CORE_LIBRARY_DEPENDENCIES ws2_32.lib)
     endif(WIN32)
@@ -165,7 +169,7 @@ else(SIMGEAR_SHARED)
     endif(NOT MSVC)
 endif(SIMGEAR_SHARED)
 
-if((NOT SIMGEAR_CORE_LIBRARIES)OR(NOT SIMGEAR_LIBRARIES))
+if((NOT SIMGEAR_CORE_LIBRARIES) OR (NOT SIMGEAR_LIBRARIES))
     message(FATAL_ERROR "Cannot find SimGear libraries! (Forgot 'make install' for SimGear?) "
             "Compile & INSTALL SimGear before configuring FlightGear. "
             "When using non-standard locations, use 'SIMGEAR_DIR' to configure the SimGear location.")
@@ -176,7 +180,11 @@ endif()
 # now we've found SimGear, try test-compiling using its includes
 include(CheckCXXSourceRuns)
 
-SET(CMAKE_REQUIRED_INCLUDES ${SIMGEAR_INCLUDE_DIR})
+set(SIMGEAR_INCLUDE_DIRS
+  ${SIMGEAR_INCLUDE_DIR}
+  ${SIMGEAR_INCLUDE_DIR}/simgear/3rdparty/utf8
+)
+SET(CMAKE_REQUIRED_INCLUDES ${SIMGEAR_INCLUDE_DIRS})
 
 # clear cache, run a fresh compile test every time
 unset(SIMGEAR_COMPILE_TEST CACHE)
@@ -222,5 +230,5 @@ unset(CMAKE_REQUIRED_DEFINITIONS)
 
 include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(SimGear DEFAULT_MSG
-     SIMGEAR_LIBRARIES SIMGEAR_CORE_LIBRARIES SIMGEAR_INCLUDE_DIR SIMGEAR_COMPILE_TEST)
+     SIMGEAR_LIBRARIES SIMGEAR_CORE_LIBRARIES SIMGEAR_INCLUDE_DIRS SIMGEAR_COMPILE_TEST)