More Super-build tweaks.
Download and extract libsvn files on Mac, and enable RTI on non-Windows builds. Factor dependencies so they work for all platforms.
This commit is contained in:
parent
530e41f1b0
commit
9019d3c49c
2 changed files with 44 additions and 24 deletions
|
@ -10,6 +10,9 @@ else()
|
|||
set(BOOST_BOOTSTRAP "bootstrap.bat")
|
||||
endif()
|
||||
|
||||
set(SG_DEPS OSG)
|
||||
set(FG_DEPS SimGear)
|
||||
|
||||
if(APPLE)
|
||||
|
||||
set(BOOST_ARGS link=static stage --with-system)
|
||||
|
@ -21,10 +24,22 @@ if(APPLE)
|
|||
BUILD_COMMAND ./bjam ${BOOST_ARGS}
|
||||
BUILD_IN_SOURCE 1
|
||||
INSTALL_COMMAND ./b2 install ${BOOST_ARGS})
|
||||
|
||||
|
||||
ExternalProject_Add(libSvn
|
||||
DOWNLOAD_COMMAND URL http://flightgear.simpits.org:8080/job/Mac-Subversion-libs/lastSuccessfulBuild/artifact/dist/*zip*/dist.zip
|
||||
PREFIX ${CMAKE_BINARY_DIR}
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND cp -r ${CMAKE_BINARY_DIR}/src/libSvn/include ${CMAKE_INSTALL_PREFIX} && cp -r ${CMAKE_BINARY_DIR}/src/libSvn/lib ${CMAKE_INSTALL_PREFIX}
|
||||
)
|
||||
|
||||
list(APPEND SG_DEPS Boost libSvn)
|
||||
endif() # of Apple
|
||||
|
||||
set (OSG_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
|
||||
# OpenSceneGraph configuration
|
||||
if (APPLE)
|
||||
SET(SDKROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk)
|
||||
# force disable Qt and Jasper, and ensure an SDKROOT is set, or
|
||||
|
@ -32,6 +47,7 @@ if (APPLE)
|
|||
SET(OSG_CMAKE_ARGS -DCMAKE_OSX_SYSROOT=${SDKROOT}
|
||||
-DOSG_USE_QT=0
|
||||
-DJASPER_LIBRARY=
|
||||
-DSDL_LIBRARY:FILEPATH=
|
||||
-DCMAKE_OSX_ARCHITECTURES=x86_64
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.7
|
||||
)
|
||||
|
@ -41,13 +57,13 @@ if (APPLE)
|
|||
|
||||
elseif(MSVC)
|
||||
set( OSG_MSVC "msvc" )
|
||||
if (${MSVC_VERSION} EQUAL 1700)
|
||||
if (${MSVC_VERSION} EQUAL 1700)
|
||||
set( OSG_MSVC ${OSG_MSVC}110 )
|
||||
elseif (${MSVC_VERSION} EQUAL 1600)
|
||||
elseif (${MSVC_VERSION} EQUAL 1600)
|
||||
set( OSG_MSVC ${OSG_MSVC}100 )
|
||||
else (${MSVC_VERSION} EQUAL 1700)
|
||||
else (${MSVC_VERSION} EQUAL 1700)
|
||||
set( OSG_MSVC ${OSG_MSVC}90 )
|
||||
endif (${MSVC_VERSION} EQUAL 1700)
|
||||
endif (${MSVC_VERSION} EQUAL 1700)
|
||||
|
||||
SET(OSG_CMAKE_ARGS
|
||||
-DACTUAL_3RDPARTY_DIR:PATH=${CMAKE_BINARY_DIR}/3rdParty
|
||||
|
@ -62,13 +78,15 @@ elseif(MSVC)
|
|||
# for compatability with MSVC directory layout
|
||||
set(OSG_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install/${OSG_MSVC}/OpenSceneGraph)
|
||||
SET(OSG_SOURCE URL http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.1.4.zip)
|
||||
|
||||
list(APPEND OSG_DEPS WinDeps)
|
||||
else()
|
||||
# normal OSG
|
||||
SET(OSG_SOURCE URL http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.1.4.zip)
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
# download 3rdpart dependeancies zip, including boost
|
||||
# download 3rdparty dependeancies zip, including boost
|
||||
ExternalProject_Add(WinDeps
|
||||
DOWNLOAD_COMMAND URL http://files.goneabitbursar.com/fg/fgfs-win32-VS100-3rdParty+OSG-20120411.zip
|
||||
# extract to current root
|
||||
|
@ -78,43 +96,43 @@ if (MSVC)
|
|||
BUILD_COMMAND ${CMAKE_SOURCE_DIR}/installWinDeps.bat
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
endif() # of Windows
|
||||
|
||||
|
||||
list(APPEND SG_CMAKE_ARGS -DBOOST_ROOT=${CMAKE_BINARY_DIR})
|
||||
list(APPEND FG_CMAKE_ARGS -DBOOST_ROOT=${CMAKE_BINARY_DIR})
|
||||
endif(MSVC) # of Windows
|
||||
|
||||
ExternalProject_Add(OSG
|
||||
DEPENDS WinDeps
|
||||
DEPENDS ${OSG_DEPS}
|
||||
PREFIX ${CMAKE_BINARY_DIR}
|
||||
${OSG_SOURCE}
|
||||
BINARY_DIR osgbuild
|
||||
CMAKE_ARGS ${OSG_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${OSG_INSTALL_PREFIX}
|
||||
# force Release build of OpenSceneGraph
|
||||
# BUILD_COMMAND "cmake --build . --config Release"
|
||||
)
|
||||
)
|
||||
|
||||
set(SG_CMAKE_ARGS -DENABLE_PACKAGE=1)
|
||||
set(FG_CMAKE_ARGS "")
|
||||
|
||||
if (FALSE)
|
||||
ExternalProject_Add(OpenRTI
|
||||
PREFIX ${CMAKE_BINARY_DIR}
|
||||
DOWNLOAD_COMMAND GIT_REPOSITORY git://gitorious.org/openrti/openrti.git
|
||||
BINARY_DIR rtibuild
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
|
||||
# FIXME install of OpenRTI is failing on Windows, files in PREFIX/share which
|
||||
# are ending up in C:/Program Files/OpenRTI
|
||||
if (NOT MSVC)
|
||||
ExternalProject_Add(OpenRTI
|
||||
PREFIX ${CMAKE_BINARY_DIR}
|
||||
DOWNLOAD_COMMAND GIT_REPOSITORY git://gitorious.org/openrti/openrti.git
|
||||
BINARY_DIR rtibuild
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
|
||||
)
|
||||
|
||||
list(APPEND SG_DEPS OpenRTI)
|
||||
list(APPEND SG_CMAKE_ARGS -DENABLE_RTI=1)
|
||||
list(APPEND FG_CMAKE_ARGS -DENABLE_RTI=1)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
if (WIN32)
|
||||
list(APPEND SG_CMAKE_ARGS -DBOOST_ROOT=${CMAKE_BINARY_DIR})
|
||||
list(APPEND FG_CMAKE_ARGS -DBOOST_ROOT=${CMAKE_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(SimGear
|
||||
PREFIX ${CMAKE_BINARY_DIR}
|
||||
DEPENDS OSG
|
||||
DEPENDS ${SG_DEPS}
|
||||
DOWNLOAD_COMMAND "" # no need to download
|
||||
UPDATE_COMMAND "" # or update.
|
||||
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/simgear
|
||||
|
@ -131,11 +149,13 @@ if (NOT WIN32)
|
|||
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${CMAKE_INSTALL_PREFIX} ${PLIB_ARGS}
|
||||
BUILD_IN_SOURCE 1
|
||||
)
|
||||
|
||||
list(APPEND FG_DEPS PLIB)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(FlightGear
|
||||
PREFIX ${CMAKE_BINARY_DIR}
|
||||
DEPENDS SimGear OSG
|
||||
DEPENDS ${FG_DEPS}
|
||||
DOWNLOAD_COMMAND "" # no need to download
|
||||
UPDATE_COMMAND "" # or update.
|
||||
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/flightgear
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 11c00afaec8836a5f52bcf8832ff2d50e2f11523
|
||||
Subproject commit ee1c8a8d662a0398711ee17c53dd64d249d2e030
|
Loading…
Reference in a new issue