]> git.mxchange.org Git - simgear.git/commitdiff
Make tsync part of libSimGearCore when building shared libraries
authorThorstenB <brehmt@gmail.com>
Sun, 19 Feb 2012 13:36:33 +0000 (14:36 +0100)
committerThorstenB <brehmt@gmail.com>
Sun, 19 Feb 2012 13:39:19 +0000 (14:39 +0100)
simgear/CMakeLists.txt
simgear/scene/tsync/CMakeLists.txt
simgear/scene/tsync/terrasync.cxx

index 684e2eee8e0ec24b2e6428d05a34e56f4468afb4..096a800c6a19760f1b356e7eec869ddf76f87742 100644 (file)
@@ -47,7 +47,7 @@ if(SIMGEAR_SHARED)
 
     add_library(SimGearCore SHARED ${coreSources})
     set_property(TARGET SimGearCore PROPERTY COMPILE_FLAGS "-DNO_OPENSCENEGRAPH_INTERFACE=1")
-    
+
   # set_property(TARGET SimGearCore PROPERTY FRAMEWORK 1)
   #  message(STATUS "public header: ${publicHeaders}")
   #  set_property(TARGET SimGearCore PROPERTY PUBLIC_HEADER "${publicHeaders}")
@@ -59,40 +59,37 @@ if(SIMGEAR_SHARED)
     target_link_libraries(SimGearCore ${ZLIB_LIBRARY} ${RT_LIBRARY})
     install(TARGETS SimGearCore LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
 
+    if(LIBSVN_FOUND)
+        add_definitions(${APR_CFLAGS})
+
+        IF(APPLE)
+            set_property(SOURCE scene/tsync/terrasync.cxx PROPERTY COMPILE_FLAGS "-iwithsysroot ${LIBSVN_INCLUDE_DIR}")
+        ELSE()
+            include_directories(${LIBSVN_INCLUDE_DIR})
+        ENDIF(APPLE)
+        target_link_libraries(SimGearCore ${LIBSVN_LIBRARIES})
+    endif(LIBSVN_FOUND)
+
     if(NOT SIMGEAR_HEADLESS)
-        if(LIBSVN_FOUND)
-            add_definitions(${APR_CFLAGS})
-
-            IF(APPLE)
-                set_property(SOURCE scene/tsync/terrasync.cxx PROPERTY COMPILE_FLAGS "-iwithsysroot ${LIBSVN_INCLUDE_DIR}")
-            ELSE()
-                include_directories(${LIBSVN_INCLUDE_DIR})
-            ENDIF(APPLE)
-        endif(LIBSVN_FOUND)
-        
         list(APPEND sceneSources scene/util/SGCoreOSGDependant.cxx)
-        
+
         add_library(SimGearScene SHARED ${sceneSources})
       # set_property(TARGET SimGearScene PROPERTY FRAMEWORK 1)
       # set_property(TARGET SimGearScene PROPERTY PUBLIC_HEADER "${publicHeaders}")
         set_property(TARGET SimGearScene PROPERTY LINKER_LANGUAGE CXX)
         set_property(TARGET SimGearScene PROPERTY VERSION   ${SIMGEAR_VERSION})
         set_property(TARGET SimGearScene PROPERTY SOVERSION ${SIMGEAR_SOVERSION})
-    
-        target_link_libraries(SimGearScene 
+
+        target_link_libraries(SimGearScene
             SimGearCore
-            ${ZLIB_LIBRARY} 
-            ${OPENSCENEGRAPH_LIBRARIES} 
+            ${ZLIB_LIBRARY}
+            ${OPENSCENEGRAPH_LIBRARIES}
             ${OPENAL_LIBRARY} ${ALUT_LIBRARY}
             ${OPENGL_LIBRARY}
             ${JPEG_LIBRARY})
     
-        if(LIBSVN_FOUND)
-            target_link_libraries(SimGearScene ${LIBSVN_LIBRARIES})
-        endif(LIBSVN_FOUND)
-
         install(TARGETS SimGearScene LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
     endif()
-   
+
 endif(SIMGEAR_SHARED)
-    
+
index bc6b62a5f12fcce0026e47ee12b6ad13092d3496..5c0be4297e7a5ab53de9c642d71bf361cdbb7601 100644 (file)
@@ -19,4 +19,4 @@ if(LIBSVN_FOUND)
 
 endif()
 
-simgear_scene_component(tsync scene/tsync "${SOURCES}" "${HEADERS}")
+simgear_component(tsync scene/tsync "${SOURCES}" "${HEADERS}")
index 70fd13cc853e78a173c6cd65098d346ec6d12802..e4ae8ff8ad0a7ce35f7ee6a395e9f72e12a67abb 100644 (file)
@@ -688,7 +688,7 @@ SGTerraSync::~SGTerraSync()
 void SGTerraSync::init()
 {
     _refreshDisplay = _terraRoot->getNode("refresh-display",true);
-    _terraRoot->getNode("built-in-svn-available",true)->setBoolValue(svn_built_in_available);
+    _terraRoot->setBoolValue("built-in-svn-available",svn_built_in_available);
     reinit();
 }
 
@@ -711,7 +711,7 @@ void SGTerraSync::reinit()
     #ifdef HAVE_SVN_CLIENT_H
         _svnThread->setUseBuiltin(_terraRoot->getBoolValue("use-built-in-svn",true));
     #else
-        _terraRoot->getNode("use-built-in-svn",true)->setBoolValue(false);
+        _terraRoot->setBoolValue("use-built-in-svn",false);
     #endif
         _svnThread->setUseSvn(_terraRoot->getBoolValue("use-svn",true));
         _svnThread->setExtSvnUtility(_terraRoot->getStringValue("ext-svn-utility","svn"));