Correct two warts in the Boost build-up scripts

This commit is contained in:
Roberto Di Remigio 2015-10-12 12:54:52 +02:00
parent b0f7670fa3
commit 8754978676
2 changed files with 5 additions and 2 deletions

View File

@ -74,6 +74,9 @@ if(FORCE_CUSTOM_BOOST)
set(BOOST_INCLUDEDIR "")
set(BOOST_LIBRARYDIR "")
else()
# Read from cache, needed for rebuilds
set(BOOST_INCLUDEDIR ${Boost_INCLUDE_DIR})
set(BOOST_LIBRARYDIR ${Boost_LIBRARY_DIR})
find_package(Boost ${BOOST_MINIMUM_REQUIRED} COMPONENTS "${BOOST_COMPONENTS_REQUIRED}")
if(NOT Boost_FOUND)
set(BUILD_CUSTOM_BOOST TRUE)
@ -104,7 +107,7 @@ if(BUILD_CUSTOM_BOOST)
include(${CMAKE_CURRENT_LIST_DIR}/boost_unpack.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/boost_userconfig.cmake)
if(NOT BOOST_COMPONENTS_REQUIRED STREQUAL "")
if(NOT "${BOOST_COMPONENTS_REQUIRED}" STREQUAL "")
# Non-empty list. Compiled libraries needed
# Transform the ;-separated list to a ,-separated list (digested by the Boost build toolchain!)
string(REPLACE ";" "," b2_needed_components "${BOOST_COMPONENTS_REQUIRED}")

View File

@ -1,7 +1,7 @@
# Install Boost
add_custom_command(
OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.installed
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BOOST_BUILD_DIR}/boost ${CUSTOM_BOOST_LOCATION}/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BOOST_BUILD_DIR}/boost ${CUSTOM_BOOST_LOCATION}/include/boost
COMMAND ${CMAKE_COMMAND} -E touch ${CUSTOM_BOOST_LOCATION}/boost.installed
WORKING_DIRECTORY ${BOOST_BUILD_DIR}
DEPENDS ${CUSTOM_BOOST_LOCATION}/boost.user-config