Superbuild: Fix and cleanup
- Fix OSG_INSTALL_PREFIX path - Fix missing OSG_INSTALL_PREFIX for flightgear - Add 64 bits support - Don't override OSG install dir - Fix CMAKE_INSTALL_PREFIX path for SG and FG - Indentation cleanup
This commit is contained in:
+12
-9
@@ -21,7 +21,6 @@ set(SG_CMAKE_ARGS "")
|
|||||||
set(FG_CMAKE_ARGS "")
|
set(FG_CMAKE_ARGS "")
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
|
||||||
set(BOOST_ARGS link=static stage --with-system)
|
set(BOOST_ARGS link=static stage --with-system)
|
||||||
ExternalProject_Add(Boost
|
ExternalProject_Add(Boost
|
||||||
PREFIX ${CMAKE_BINARY_DIR}
|
PREFIX ${CMAKE_BINARY_DIR}
|
||||||
@@ -38,13 +37,13 @@ endif() # of Apple
|
|||||||
set(OSG_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
|
set(OSG_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||||
|
|
||||||
# OpenSceneGraph configuration
|
# OpenSceneGraph configuration
|
||||||
SET(OSG_SOURCE URL http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.2.0.zip)
|
set(OSG_SOURCE URL http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.2.0.zip)
|
||||||
|
|
||||||
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
|
||||||
# osgViewer system detection goes wrongh
|
# osgViewer system detection goes wrongh
|
||||||
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=
|
-DSDL_LIBRARY:FILEPATH=
|
||||||
@@ -52,8 +51,8 @@ if (APPLE)
|
|||||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.7
|
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.7
|
||||||
)
|
)
|
||||||
# OSG with some patches applied for Mac
|
# OSG with some patches applied for Mac
|
||||||
# SET(OSG_SOURCE GIT_REPOSITORY git://gitorious.org/+flightgear-developers/openscenegraph/mac-release-osg.git)
|
# set(OSG_SOURCE GIT_REPOSITORY git://gitorious.org/+flightgear-developers/openscenegraph/mac-release-osg.git)
|
||||||
# SET(OSG_SOURCE URL http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.2.0.zip)
|
# set(OSG_SOURCE URL http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.2.0.zip)
|
||||||
|
|
||||||
elseif(MSVC)
|
elseif(MSVC)
|
||||||
set(OSG_MSVC "msvc")
|
set(OSG_MSVC "msvc")
|
||||||
@@ -64,6 +63,9 @@ elseif(MSVC)
|
|||||||
else (${MSVC_VERSION} EQUAL 1700)
|
else (${MSVC_VERSION} EQUAL 1700)
|
||||||
set(OSG_MSVC ${OSG_MSVC}90)
|
set(OSG_MSVC ${OSG_MSVC}90)
|
||||||
endif (${MSVC_VERSION} EQUAL 1700)
|
endif (${MSVC_VERSION} EQUAL 1700)
|
||||||
|
if (CMAKE_CL_64)
|
||||||
|
set(OSG_MSVC ${OSG_MSVC}-64)
|
||||||
|
endif (CMAKE_CL_64)
|
||||||
|
|
||||||
SET(OSG_CMAKE_ARGS
|
SET(OSG_CMAKE_ARGS
|
||||||
-DACTUAL_3RDPARTY_DIR:PATH=${CMAKE_BINARY_DIR}/3rdParty
|
-DACTUAL_3RDPARTY_DIR:PATH=${CMAKE_BINARY_DIR}/3rdParty
|
||||||
@@ -76,7 +78,7 @@ 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 ${OSG_INSTALL_PREFIX}/${OSG_MSVC}/OpenSceneGraph)
|
||||||
list(APPEND OSG_DEPS WinDeps)
|
list(APPEND OSG_DEPS WinDeps)
|
||||||
else()
|
else()
|
||||||
# normal OSG
|
# normal OSG
|
||||||
@@ -150,7 +152,8 @@ ExternalProject_Add(SimGear
|
|||||||
UPDATE_COMMAND "" # or update.
|
UPDATE_COMMAND "" # or update.
|
||||||
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/simgear
|
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/simgear
|
||||||
BINARY_DIR sgbuild
|
BINARY_DIR sgbuild
|
||||||
CMAKE_ARGS ${SG_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_PREFIX_PATH=${OSG_INSTALL_PREFIX})
|
CMAKE_ARGS ${SG_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}/${OSG_MSVC} -DCMAKE_PREFIX_PATH=${OSG_INSTALL_PREFIX}
|
||||||
|
)
|
||||||
|
|
||||||
# on Windows, PLIB is in the 3rd-party dependencies zip
|
# on Windows, PLIB is in the 3rd-party dependencies zip
|
||||||
if (NOT WIN32)
|
if (NOT WIN32)
|
||||||
@@ -174,5 +177,5 @@ ExternalProject_Add(FlightGear
|
|||||||
UPDATE_COMMAND "" # or update.
|
UPDATE_COMMAND "" # or update.
|
||||||
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/flightgear
|
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/flightgear
|
||||||
BINARY_DIR fgbuild
|
BINARY_DIR fgbuild
|
||||||
CMAKE_ARGS ${FG_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
|
CMAKE_ARGS ${FG_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}/${OSG_MSVC} -DCMAKE_PREFIX_PATH=${OSG_INSTALL_PREFIX}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user