diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 2cc98f16b3..ca9ae9ac1a 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,4 +1,4 @@ Source: boost -Version: 1.63 +Version: 1.63-1 Description: Peer-reviewed portable C++ source libraries Build-Depends: zlib, bzip2 diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 81424078eb..c4183d3188 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -36,9 +36,9 @@ set(B2_OPTIONS -j$ENV{NUMBER_OF_PROCESSORS} --debug-configuration --hash + -q --without-python - toolset=msvc threading=multi ) @@ -57,9 +57,23 @@ endif() if(TRIPLET_SYSTEM_ARCH MATCHES "x64") list(APPEND B2_OPTIONS address-model=64) endif() + +if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + message(WARNING "Combination of VS2017 and UWP is partially supported; using reference Winmd's from VS2015") +endif() if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") list(APPEND B2_OPTIONS windows-api=store) - set(ENV{BOOST_BUILD_PATH} ${CMAKE_CURRENT_LIST_DIR}) + set(ENV{BOOST_BUILD_PATH} ${CMAKE_CURRENT_LIST_DIR}/uwp) +else() + set(ENV{BOOST_BUILD_PATH} ${CMAKE_CURRENT_LIST_DIR}/vs2017) +endif() + +if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + list(APPEND B2_OPTIONS toolset=msvc-14.1) +elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v140") + list(APPEND B2_OPTIONS toolset=msvc-14.0) +else() + message(FATAL_ERROR "Unsupported value for VCPKG_PLATFORM_TOOLSET: '${VCPKG_PLATFORM_TOOLSET}'") endif() # Add build type specific options @@ -147,6 +161,7 @@ function(boost_rename_libs LIBS) get_filename_component(DIRECTORY_OF_LIB_FILE ${LIB} DIRECTORY) string(REPLACE "libboost_" "boost_" NEW_FILENAME ${OLD_FILENAME}) string(REPLACE "-s-" "-" NEW_FILENAME ${NEW_FILENAME}) # For Release libs + string(REPLACE "-vc141-" "-vc140-" NEW_FILENAME ${NEW_FILENAME}) # To merge VS2017 and VS2015 binaries string(REPLACE "-sgd-" "-gd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs if (EXISTS ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) file(REMOVE ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}) @@ -165,7 +180,7 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.dll") endif() -file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/libboost*.lib) +file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*.lib) boost_rename_libs(RELEASE_LIBS) message(STATUS "Packaging ${TARGET_TRIPLET}-rel done") @@ -178,7 +193,7 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "*.dll") endif() -file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/libboost*.lib) +file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*.lib) boost_rename_libs(DEBUG_LIBS) message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done") diff --git a/ports/boost/user-config.jam b/ports/boost/user-config.jam deleted file mode 100644 index 58184920a6..0000000000 --- a/ports/boost/user-config.jam +++ /dev/null @@ -1,10 +0,0 @@ -using msvc : 14.0 : : -"\"/AIC:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\store\\references\"" -/appcontainer -/nodefaultlibs -WindowsApp.lib -release:vcruntime.lib -debug:vcruntimed.lib -release:ucrt.lib -debug:ucrtd.lib -; diff --git a/ports/boost/uwp/user-config.jam b/ports/boost/uwp/user-config.jam new file mode 100644 index 0000000000..9dbbb352f3 --- /dev/null +++ b/ports/boost/uwp/user-config.jam @@ -0,0 +1,23 @@ +using msvc : 14.0 : : +echo +"\"/AIC:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\store\\references\"" +/appcontainer +/nodefaultlibs +WindowsApp.lib +release:vcruntime.lib +debug:vcruntimed.lib +release:ucrt.lib +debug:ucrtd.lib +; + +using msvc : 14.1 : cl.exe : +echo +"\"/AIC:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\store\\references\"" +/appcontainer +/nodefaultlibs +WindowsApp.lib +release:vcruntime.lib +debug:vcruntimed.lib +release:ucrt.lib +debug:ucrtd.lib +; diff --git a/ports/boost/vs2017/user-config.jam b/ports/boost/vs2017/user-config.jam new file mode 100644 index 0000000000..8faba6d72d --- /dev/null +++ b/ports/boost/vs2017/user-config.jam @@ -0,0 +1,7 @@ +using msvc : 14.0 : cl.exe : +echo +; + +using msvc : 14.1 : cl.exe : +echo +;