]> git.mxchange.org Git - flightgear.git/commitdiff
Improved CMake support for libsvn
authorThorstenB <brehmt@gmail.com>
Thu, 4 Aug 2011 16:59:46 +0000 (18:59 +0200)
committerThorstenB <brehmt@gmail.com>
Thu, 4 Aug 2011 16:59:46 +0000 (18:59 +0200)
Don't detect libsvn without APR.
When installed, enable libsvn support by default (same as for automake).
When enabled, provide libsvn to fgfs.
gitignore temporary CMake files

.gitignore
CMakeLists.txt
CMakeModules/FindSvnClient.cmake
src/Main/CMakeLists.txt
utils/fgadmin/src/.gitignore [new file with mode: 0644]

index 1ff6ff74daf49035ba18bb0351fbd6fb9ab2e11d..80583e2e417b9a2aa8f6e415709acb39bd685d02 100644 (file)
@@ -15,3 +15,7 @@ INSTALL
 Debug/
 *.o
 lib*.a
+CMakeFiles
+CMakeCache.txt
+*.cmake
+
index 364075f9801151de5aefb1b453e5768aafddba95..f8553454e040e954eb0342b45da86ef37ef048fb 100644 (file)
@@ -55,7 +55,7 @@ option(ENABLE_YASIM "Set to ON to build FlightGear with YASIM FDM" ON)
 option(ENABLE_JSBSIM "Set to ON to build FlightGear with JSBSim FDM" ON)
 option(ENABLE_FGADMIN "Set to ON to build FlightGear with FGADMIN" ON)
 option(EVENT_INPUT "Set to ON to build FlightGear with event-based Input support" OFF)
-option(ENABLE_LIBSVN "Set to ON to build FlightGear/terrasync with libsvnclient support" OFF)
+option(ENABLE_LIBSVN "Set to ON to build FlightGear/terrasync with libsvnclient support" ON)
 option(WITH_FGPANEL "Set to ON to build the fgpanel application" ON)
 
 set(MSVC_3RDPARTY_ROOT NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted")
index 717b8b04d0d749b3b0e1fdd849de65eed1fbab7e..0823a532298168fe26c720c789b8fa232f73c722 100644 (file)
@@ -22,27 +22,29 @@ else(HAVE_APR_CONFIG)
     message(STATUS "apr-1-config not found, implement manual search for APR")
 endif(HAVE_APR_CONFIG)
 
-find_path(LIBSVN_INCLUDE_DIR svn_client.h
-  HINTS
-  $ENV{LIBSVN_DIR}
-  PATH_SUFFIXES include/subversion-1
-  PATHS
-  /usr/local
-  /usr
-  /opt
-)
+if(HAVE_APR_CONFIG)
+       find_path(LIBSVN_INCLUDE_DIR svn_client.h
+         HINTS
+         $ENV{LIBSVN_DIR}
+         PATH_SUFFIXES include/subversion-1
+         PATHS
+         /usr/local
+         /usr
+         /opt
+       )
 
-check_library_exists(svn_client-1 svn_client_checkout "" HAVE_LIB_SVNCLIENT)
-check_library_exists(svn_subr-1 svn_cmdline_init "" HAVE_LIB_SVNSUBR)
-check_library_exists(svn_ra-1 svn_ra_initialize "" HAVE_LIB_SVNRA)
+       check_library_exists(svn_client-1 svn_client_checkout "" HAVE_LIB_SVNCLIENT)
+       check_library_exists(svn_subr-1 svn_cmdline_init "" HAVE_LIB_SVNSUBR)
+       check_library_exists(svn_ra-1 svn_ra_initialize "" HAVE_LIB_SVNRA)
 
-include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBSVN DEFAULT_MSG 
-    HAVE_LIB_SVNSUBR 
-    HAVE_LIB_SVNCLIENT
-    HAVE_LIB_SVNRA 
-    LIBSVN_INCLUDE_DIR)
+       include(FindPackageHandleStandardArgs)
+       FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBSVN DEFAULT_MSG 
+               HAVE_LIB_SVNSUBR 
+               HAVE_LIB_SVNCLIENT
+               HAVE_LIB_SVNRA 
+               LIBSVN_INCLUDE_DIR)
 
-if(LIBSVN_FOUND)
-    set(LIBSVN_LIBRARIES "svn_client-1" "svn_subr-1" "svn_ra-1" ${APR_LIBS})
-endif(LIBSVN_FOUND)
+       if(LIBSVN_FOUND)
+               set(LIBSVN_LIBRARIES "svn_client-1" "svn_subr-1" "svn_ra-1" ${APR_LIBS})
+       endif(LIBSVN_FOUND)
+endif(HAVE_APR_CONFIG)
index c03bdaeeda7dcfbd19af9df2ae173a8f8a978165..2f80a23f625fa480b25acbcd843af31b52b6e187 100644 (file)
@@ -78,6 +78,7 @@ target_link_libraries(fgfs
        ${ALUT_LIBRARY} 
        ${ZLIB_LIBRARIES}
        ${PLIB_LIBRARIES}
+       ${LIBSVN_LIBRARIES}
        ${RT_LIBRARY})
        
 install(TARGETS fgfs RUNTIME DESTINATION bin)
diff --git a/utils/fgadmin/src/.gitignore b/utils/fgadmin/src/.gitignore
new file mode 100644 (file)
index 0000000..6e2d97b
--- /dev/null
@@ -0,0 +1 @@
+fgadmin