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")
|
set(BOOST_BOOTSTRAP "bootstrap.bat")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(SG_DEPS OSG)
|
||||||
|
set(FG_DEPS SimGear)
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
|
||||||
set(BOOST_ARGS link=static stage --with-system)
|
set(BOOST_ARGS link=static stage --with-system)
|
||||||
|
@ -21,10 +24,22 @@ if(APPLE)
|
||||||
BUILD_COMMAND ./bjam ${BOOST_ARGS}
|
BUILD_COMMAND ./bjam ${BOOST_ARGS}
|
||||||
BUILD_IN_SOURCE 1
|
BUILD_IN_SOURCE 1
|
||||||
INSTALL_COMMAND ./b2 install ${BOOST_ARGS})
|
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
|
endif() # of Apple
|
||||||
|
|
||||||
set (OSG_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
|
set (OSG_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||||
|
|
||||||
|
# OpenSceneGraph configuration
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
SET(SDKROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk)
|
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
|
# 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}
|
SET(OSG_CMAKE_ARGS -DCMAKE_OSX_SYSROOT=${SDKROOT}
|
||||||
-DOSG_USE_QT=0
|
-DOSG_USE_QT=0
|
||||||
-DJASPER_LIBRARY=
|
-DJASPER_LIBRARY=
|
||||||
|
-DSDL_LIBRARY:FILEPATH=
|
||||||
-DCMAKE_OSX_ARCHITECTURES=x86_64
|
-DCMAKE_OSX_ARCHITECTURES=x86_64
|
||||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.7
|
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.7
|
||||||
)
|
)
|
||||||
|
@ -62,13 +78,15 @@ elseif(MSVC)
|
||||||
# for compatability with MSVC directory layout
|
# for compatability with MSVC directory layout
|
||||||
set(OSG_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install/${OSG_MSVC}/OpenSceneGraph)
|
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)
|
SET(OSG_SOURCE URL http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.1.4.zip)
|
||||||
|
|
||||||
|
list(APPEND OSG_DEPS WinDeps)
|
||||||
else()
|
else()
|
||||||
# normal OSG
|
# normal OSG
|
||||||
SET(OSG_SOURCE URL http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.1.4.zip)
|
SET(OSG_SOURCE URL http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.1.4.zip)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
# download 3rdpart dependeancies zip, including boost
|
# download 3rdparty dependeancies zip, including boost
|
||||||
ExternalProject_Add(WinDeps
|
ExternalProject_Add(WinDeps
|
||||||
DOWNLOAD_COMMAND URL http://files.goneabitbursar.com/fg/fgfs-win32-VS100-3rdParty+OSG-20120411.zip
|
DOWNLOAD_COMMAND URL http://files.goneabitbursar.com/fg/fgfs-win32-VS100-3rdParty+OSG-20120411.zip
|
||||||
# extract to current root
|
# extract to current root
|
||||||
|
@ -78,10 +96,14 @@ if (MSVC)
|
||||||
BUILD_COMMAND ${CMAKE_SOURCE_DIR}/installWinDeps.bat
|
BUILD_COMMAND ${CMAKE_SOURCE_DIR}/installWinDeps.bat
|
||||||
INSTALL_COMMAND ""
|
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
|
ExternalProject_Add(OSG
|
||||||
DEPENDS WinDeps
|
DEPENDS ${OSG_DEPS}
|
||||||
PREFIX ${CMAKE_BINARY_DIR}
|
PREFIX ${CMAKE_BINARY_DIR}
|
||||||
${OSG_SOURCE}
|
${OSG_SOURCE}
|
||||||
BINARY_DIR osgbuild
|
BINARY_DIR osgbuild
|
||||||
|
@ -93,7 +115,9 @@ ExternalProject_Add(OSG
|
||||||
set(SG_CMAKE_ARGS -DENABLE_PACKAGE=1)
|
set(SG_CMAKE_ARGS -DENABLE_PACKAGE=1)
|
||||||
set(FG_CMAKE_ARGS "")
|
set(FG_CMAKE_ARGS "")
|
||||||
|
|
||||||
if (FALSE)
|
# 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
|
ExternalProject_Add(OpenRTI
|
||||||
PREFIX ${CMAKE_BINARY_DIR}
|
PREFIX ${CMAKE_BINARY_DIR}
|
||||||
DOWNLOAD_COMMAND GIT_REPOSITORY git://gitorious.org/openrti/openrti.git
|
DOWNLOAD_COMMAND GIT_REPOSITORY git://gitorious.org/openrti/openrti.git
|
||||||
|
@ -101,20 +125,14 @@ ExternalProject_Add(OpenRTI
|
||||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
|
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
list(APPEND SG_DEPS OpenRTI)
|
||||||
list(APPEND SG_CMAKE_ARGS -DENABLE_RTI=1)
|
list(APPEND SG_CMAKE_ARGS -DENABLE_RTI=1)
|
||||||
list(APPEND FG_CMAKE_ARGS -DENABLE_RTI=1)
|
list(APPEND FG_CMAKE_ARGS -DENABLE_RTI=1)
|
||||||
endif()
|
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
|
ExternalProject_Add(SimGear
|
||||||
PREFIX ${CMAKE_BINARY_DIR}
|
PREFIX ${CMAKE_BINARY_DIR}
|
||||||
DEPENDS OSG
|
DEPENDS ${SG_DEPS}
|
||||||
DOWNLOAD_COMMAND "" # no need to download
|
DOWNLOAD_COMMAND "" # no need to download
|
||||||
UPDATE_COMMAND "" # or update.
|
UPDATE_COMMAND "" # or update.
|
||||||
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/simgear
|
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}
|
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${CMAKE_INSTALL_PREFIX} ${PLIB_ARGS}
|
||||||
BUILD_IN_SOURCE 1
|
BUILD_IN_SOURCE 1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
list(APPEND FG_DEPS PLIB)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ExternalProject_Add(FlightGear
|
ExternalProject_Add(FlightGear
|
||||||
PREFIX ${CMAKE_BINARY_DIR}
|
PREFIX ${CMAKE_BINARY_DIR}
|
||||||
DEPENDS SimGear OSG
|
DEPENDS ${FG_DEPS}
|
||||||
DOWNLOAD_COMMAND "" # no need to download
|
DOWNLOAD_COMMAND "" # no need to download
|
||||||
UPDATE_COMMAND "" # or update.
|
UPDATE_COMMAND "" # or update.
|
||||||
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/flightgear
|
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/flightgear
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 11c00afaec8836a5f52bcf8832ff2d50e2f11523
|
Subproject commit ee1c8a8d662a0398711ee17c53dd64d249d2e030
|
Loading…
Reference in a new issue