option(SIMGEAR_SHARED "Set to ON to build SimGear as a shared library/framework" OFF)
option(SIMGEAR_HEADLESS "Set to ON to build SimGear with GUI/graphics support" OFF)
option(JPEG_FACTORY "Enable JPEG-factory support" OFF)
-option(ENABLE_LIBSVN "Set to ON to build SimGear with libsvnclient support" OFF)
+option(ENABLE_LIBSVN "Set to ON to build SimGear with libsvnclient support" ON)
set(MSVC_3RDPARTY_ROOT NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted")
if(ENABLE_LIBSVN)
find_package(SvnClient)
-
+
if(LIBSVN_FOUND)
message(STATUS "libsvn found, enabling in SimGear")
set(HAVE_SVN_CLIENT_H 1)
set(HAVE_LIBSVN_CLIENT_1 1)
+ else()
+ message(STATUS "Missing libsvn, unable to enable SVN in SimGear")
endif(LIBSVN_FOUND)
endif(ENABLE_LIBSVN)
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
-)
-
-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)
-
-if(LIBSVN_FOUND)
- set(LIBSVN_LIBRARIES "svn_client-1" "svn_subr-1" "svn_ra-1" ${APR_LIBS})
-endif(LIBSVN_FOUND)
+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)
+
+ 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)
+endif(HAVE_APR_CONFIG)
+
terrasync.cxx
)
+if(LIBSVN_FOUND)
+ add_definitions(${APR_CFLAGS})
+
+ IF(APPLE)
+ set_property(SOURCE terrasync.cxx PROPERTY COMPILE_FLAGS "-iwithsysroot ${LIBSVN_INCLUDE_DIR}")
+ ELSE()
+ include_directories(${LIBSVN_INCLUDE_DIR})
+ ENDIF(APPLE)
+
+endif()
+
simgear_component(tsync scene/tsync "${SOURCES}" "${HEADERS}")
#cmakedefine HAVE_ISNAN
#cmakedefine HAVE_WINDOWS_H
+#cmakedefine HAVE_SVN_CLIENT_H
+#cmakedefine HAVE_LIBSVN_CLIENT_1
+
// set if building headless (no OSG or OpenGL libs)
#cmakedefine NO_OPENSCENEGRAPH_INTERFACE