mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2024-12-28 18:18:52 +00:00
Allow the ability to choose to compile against boost libs statically.
This commit is contained in:
parent
5f5addf052
commit
4114e823ac
@ -25,7 +25,8 @@ set (OPENMW_VERSION "${OPENMW_VERSION_MAJOR}.${OPENMW_VERSION_MINOR}.${OPENMW_VE
|
|||||||
configure_file ("${OpenMW_SOURCE_DIR}/Docs/mainpage.hpp.cmake" "${OpenMW_SOURCE_DIR}/Docs/mainpage.hpp")
|
configure_file ("${OpenMW_SOURCE_DIR}/Docs/mainpage.hpp.cmake" "${OpenMW_SOURCE_DIR}/Docs/mainpage.hpp")
|
||||||
|
|
||||||
option(MYGUI_STATIC "Link static build of Mygui into the binaries" FALSE)
|
option(MYGUI_STATIC "Link static build of Mygui into the binaries" FALSE)
|
||||||
option(OGRE_STATIC "Link static build of Ogre and Ogre Plugins into the binaries" FALSE)
|
option(OGRE_STATIC "Link static build of Ogre and Ogre Plugins into the binaries" FALSE)
|
||||||
|
option(BOOST_STATIC "Link static build of Boost into the binaries" FALSE)
|
||||||
|
|
||||||
# Apps and tools
|
# Apps and tools
|
||||||
option(BUILD_ESMTOOL "build ESM inspector" ON)
|
option(BUILD_ESMTOOL "build ESM inspector" ON)
|
||||||
@ -167,9 +168,9 @@ if (WIN32)
|
|||||||
set(PLATFORM_INCLUDE_DIR "platform")
|
set(PLATFORM_INCLUDE_DIR "platform")
|
||||||
add_definitions(-DBOOST_ALL_NO_LIB)
|
add_definitions(-DBOOST_ALL_NO_LIB)
|
||||||
else (WIN32)
|
else (WIN32)
|
||||||
set(PLATFORM_INCLUDE_DIR "")
|
set(PLATFORM_INCLUDE_DIR "")
|
||||||
find_path (UUID_INCLUDE_DIR uuid/uuid.h)
|
find_path (UUID_INCLUDE_DIR uuid/uuid.h)
|
||||||
include_directories(${UUID_INCLUDE_DIR})
|
include_directories(${UUID_INCLUDE_DIR})
|
||||||
endif (WIN32)
|
endif (WIN32)
|
||||||
if (MSVC10)
|
if (MSVC10)
|
||||||
set(PLATFORM_INCLUDE_DIR "")
|
set(PLATFORM_INCLUDE_DIR "")
|
||||||
@ -183,7 +184,7 @@ endif (APPLE)
|
|||||||
|
|
||||||
# Fix for not visible pthreads functions for linker with glibc 2.15
|
# Fix for not visible pthreads functions for linker with glibc 2.15
|
||||||
if (UNIX AND NOT APPLE)
|
if (UNIX AND NOT APPLE)
|
||||||
find_package (Threads)
|
find_package (Threads)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# find boost without components so we can use Boost_VERSION
|
# find boost without components so we can use Boost_VERSION
|
||||||
@ -196,6 +197,10 @@ if (Boost_VERSION LESS 104900)
|
|||||||
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} wave)
|
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} wave)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
IF(BOOST_STATIC)
|
||||||
|
set(Boost_USE_STATIC_LIBS ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(OGRE REQUIRED)
|
find_package(OGRE REQUIRED)
|
||||||
find_package(MyGUI REQUIRED)
|
find_package(MyGUI REQUIRED)
|
||||||
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||||
|
Loading…
Reference in New Issue
Block a user