]> git.mxchange.org Git - simgear.git/blobdiff - CMakeLists.txt
Fix use count for deleted, reference counted objects.
[simgear.git] / CMakeLists.txt
index 3b60b851b7425a7f4b45b5720e7f230a7a9fb9c9..c2ad568b3a3931f055b4fd4c7435f93128d1567c 100644 (file)
@@ -100,7 +100,6 @@ set(SYSTEM_EXPAT OFF)
 endif()
 
 option(SIMGEAR_HEADLESS "Set to ON to build SimGear without GUI/graphics support" OFF)
-option(JPEG_FACTORY     "Enable JPEG-factory support" OFF)
 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)
@@ -161,7 +160,7 @@ if (MSVC AND MSVC_3RDPARTY_ROOT)
 endif (MSVC AND MSVC_3RDPARTY_ROOT)
 
 if(APPLE)
-  find_library(CORE_SERVICES_LIBRARY CoreServices)
+  find_library(COCOA_LIBRARY Cocoa)
 endif()
 
 find_package(Boost REQUIRED)
@@ -179,17 +178,9 @@ else()
         message(STATUS "Sound support: ENABLED")
     endif(ENABLE_SOUND)
     
-    find_package(OpenSceneGraph 3.0.0 REQUIRED osgText osgSim osgDB osgParticle osgGA osgUtil)
+    find_package(OpenSceneGraph 3.2.0 REQUIRED osgText osgSim osgDB osgParticle osgGA osgUtil)
 endif(SIMGEAR_HEADLESS)
 
-if(JPEG_FACTORY)
-    message(STATUS "JPEG-factory: ENABLED")
-    find_package(JPEG REQUIRED)
-    include_directories(${JPEG_INCLUDE_DIR})
-else()
-    message(STATUS "JPEG-factory: DISABLED")
-endif(JPEG_FACTORY)
-
 find_package(ZLIB REQUIRED)
 find_package(Threads REQUIRED)
 
@@ -269,7 +260,9 @@ check_cxx_source_compiles(
 
 if(HAVE_DLFCN_H)
     check_library_exists(dl dlerror "" HAVE_DL)
-    set(DL_LIBRARY "dl")
+    if(HAVE_DL)
+        set(DL_LIBRARY "dl")
+    endif()
 endif()
 
 SET(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "add a postfix, usually 'd' on windows")
@@ -342,9 +335,11 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS_C} ${MSVC_FLAGS}")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS_CXX} ${MSVC_FLAGS} ${BOOST_CXX_FLAGS}")
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MSVC_LD_FLAGS}")
 
-include_directories(${PROJECT_SOURCE_DIR})
-include_directories(${PROJECT_SOURCE_DIR}/simgear/canvas/ShivaVG/include)
-include_directories(${PROJECT_BINARY_DIR}/simgear)
+# use BEFORE to ensure local directories are used first, 
+# ahead of system-installed libs
+include_directories(BEFORE ${PROJECT_SOURCE_DIR})
+include_directories(BEFORE ${PROJECT_SOURCE_DIR}/simgear/canvas/ShivaVG/include)
+include_directories(BEFORE ${PROJECT_BINARY_DIR}/simgear)
 
 include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS} 
     ${Boost_INCLUDE_DIRS} 
@@ -378,7 +373,7 @@ set(TEST_LIBS_INTERNAL_CORE
     ${WINSOCK_LIBRARY}
     ${RT_LIBRARY}
     ${DL_LIBRARY}
-    ${CORE_SERVICES_LIBRARY})
+    ${COCOA_LIBRARY})
 set(TEST_LIBS SimGearCore ${TEST_LIBS_INTERNAL_CORE})
 
 if(NOT SIMGEAR_HEADLESS)