option(ENABLE_LIBSVN "Set to ON to build SimGear with libsvnclient support" ON)
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(SYSTEM_EXPAT "Set to ON to build SimGear using the system libExpat" OFF)
if (MSVC)
GET_FILENAME_COMPONENT(PARENT_DIR ${PROJECT_SOURCE_DIR} PATH)
if (MSVC AND MSVC_3RDPARTY_ROOT)
message(STATUS "3rdparty files located in ${MSVC_3RDPARTY_ROOT}")
set( OSG_MSVC "msvc" )
- if (${MSVC_VERSION} EQUAL 1600)
+ if (${MSVC_VERSION} EQUAL 1700)
+ set( OSG_MSVC ${OSG_MSVC}110 )
+ elseif (${MSVC_VERSION} EQUAL 1600)
set( OSG_MSVC ${OSG_MSVC}100 )
- else (${MSVC_VERSION} EQUAL 1600)
+ else (${MSVC_VERSION} EQUAL 1700)
set( OSG_MSVC ${OSG_MSVC}90 )
- endif (${MSVC_VERSION} EQUAL 1600)
+ endif (${MSVC_VERSION} EQUAL 1700)
if (CMAKE_CL_64)
set( OSG_MSVC ${OSG_MSVC}-64 )
set( MSVC_3RDPARTY_DIR 3rdParty.x64 )
find_package(ZLIB REQUIRED)
find_package(Threads REQUIRED)
+if (SYSTEM_EXPAT)
+ message(STATUS "Requested to use system Expat library, forcing SIMGEAR_SHARED to true")
+ set(SIMGEAR_SHARED ON)
+ find_package(EXPAT REQUIRED)
+ include_directories(${EXPAT_INCLUDE_DIRS})
+else()
+ message(STATUS "Using built-in expat code")
+ add_definitions(-DHAVE_EXPAT_CONFIG_H)
+endif(SYSTEM_EXPAT)
+
check_include_file(sys/time.h HAVE_SYS_TIME_H)
check_include_file(sys/timeb.h HAVE_SYS_TIMEB_H)
check_include_file(unistd.h HAVE_UNISTD_H)
# SET(WARNING_FLAGS "${WARNING_FLAGS} /wd${warning}")
# endforeach(warning)
- set(MSVC_FLAGS "-DWIN32 -DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS /wd4996")
+ set(MSVC_FLAGS "-DWIN32 -DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS /wd4996 /wd4250")
endif(MSVC)
# assumed on Windows
${OPENAL_INCLUDE_DIR} )
add_definitions(-DHAVE_CONFIG_H)
-add_definitions(-DHAVE_EXPAT_CONFIG_H)
# configure a header file to pass some of the CMake settings
# to the source code