mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-02 21:49:00 +08:00
050e71d01d
* [various ports] remove references to CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS * [alac,benchmark,capnproto] Fix check_linkage call * [fastlz] Fix SHA512 * [coroutine] Fix dynamic build * [folly] Find double-conversion * [gamma] Use vcpkg_from_github * [librsync] Enable static builds * [netcdf-cxx4] Fix SHA512 * [octomap] Fix static build * [tidy-html5] Fix static build * [various ports] remove custom messages for shared/static builds, modernize some scripts in the meantime * [folly] Use ras0219's fix for link paths * [octomap] Fix exported targets * [uvatlas] Set tool download SHA512 * [duktape+python2] fix portfile to call configure with correct python version, manage python2 also outside win32 * [suitesparse] osx fix * [gtkmm] Call vcpkg_check_linkage after including vcpkg functions * [duktape] Resolve conflicts * [duktape] FIxed typo in Python paths * [wangle] Find zlib * [openssl-uwp] Fix SHA512 * [glib] Allow static builds on non-Windows * [suitesparse] Fix build on Windows * [multiple ports] Bump CONTROL version * [multiple ports] Fix description indent * [directxtk] Fix CONTROL file * [bde,duktape,qpid-proton] Build packages with python2 installed * [binn] remove CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS * [gdal,live555,uriparser] Fix regressions * [live555] Update to 2019.04.24
101 lines
3.5 KiB
CMake
101 lines
3.5 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
|
endif()
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO 01org/tbb
|
|
REF 2019_U5
|
|
SHA512 227b12e3864fbb922ddbc99700bf94d7d8897d62e2056bf3beb608efacf3ca785dd416b94ad65b421b6c9fc11caff688147b5fbe400c51e98678cee5dc04f274
|
|
HEAD_REF tbb_2019
|
|
)
|
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
|
|
|
if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
# Settings for TBBConfigInternal.cmake.in
|
|
set(TBB_LIB_EXT a)
|
|
set(TBB_LIB_PREFIX lib)
|
|
else()
|
|
if (VCPKG_CRT_LINKAGE STREQUAL static)
|
|
set(RELEASE_CONFIGURATION Release-MT)
|
|
set(DEBUG_CONFIGURATION Debug-MT)
|
|
else()
|
|
set(RELEASE_CONFIGURATION Release)
|
|
set(DEBUG_CONFIGURATION Debug)
|
|
endif()
|
|
|
|
vcpkg_install_msbuild(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PROJECT_SUBPATH build/vs2013/makefile.sln
|
|
RELEASE_CONFIGURATION ${RELEASE_CONFIGURATION}
|
|
DEBUG_CONFIGURATION ${DEBUG_CONFIGURATION}
|
|
)
|
|
# Settings for TBBConfigInternal.cmake.in
|
|
set(TBB_LIB_EXT lib)
|
|
set(TBB_LIB_PREFIX)
|
|
endif()
|
|
|
|
file(COPY
|
|
${SOURCE_PATH}/include/tbb
|
|
${SOURCE_PATH}/include/serial
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
|
|
|
# Settings for TBBConfigInternal.cmake.in
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
set(TBB_DEFAULT_COMPONENTS tbb tbbmalloc)
|
|
else()
|
|
set(TBB_DEFAULT_COMPONENTS tbb tbbmalloc tbbmalloc_proxy)
|
|
endif()
|
|
|
|
file(READ "${SOURCE_PATH}/include/tbb/tbb_stddef.h" _tbb_stddef)
|
|
string(REGEX REPLACE ".*#define TBB_VERSION_MAJOR ([0-9]+).*" "\\1" _tbb_ver_major "${_tbb_stddef}")
|
|
string(REGEX REPLACE ".*#define TBB_VERSION_MINOR ([0-9]+).*" "\\1" _tbb_ver_minor "${_tbb_stddef}")
|
|
string(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_tbb_stddef}")
|
|
set(TBB_VERSION "${_tbb_ver_major}.${_tbb_ver_minor}")
|
|
set(TBB_RELEASE_DIR "\${_tbb_root}/lib")
|
|
set(TBB_DEBUG_DIR "\${_tbb_root}/debug/lib")
|
|
|
|
configure_file(
|
|
${SOURCE_PATH}/cmake/templates/TBBConfigInternal.cmake.in
|
|
${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake
|
|
@ONLY
|
|
)
|
|
file(READ ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake _contents)
|
|
string(REPLACE
|
|
"get_filename_component(_tbb_root \"\${_tbb_root}\" PATH)"
|
|
"get_filename_component(_tbb_root \"\${_tbb_root}\" PATH)\nget_filename_component(_tbb_root \"\${_tbb_root}\" PATH)"
|
|
_contents
|
|
"${_contents}"
|
|
)
|
|
string(REPLACE
|
|
"set(_tbb_release_lib \"/${TBB_LIB_PREFIX}\${_tbb_component}.${TBB_LIB_EXT}\")"
|
|
"set(_tbb_release_lib \"\${_tbb_root}/lib/${TBB_LIB_PREFIX}\${_tbb_component}.${TBB_LIB_EXT}\")"
|
|
_contents
|
|
"${_contents}"
|
|
)
|
|
string(REPLACE
|
|
"set(_tbb_debug_lib \"/${TBB_LIB_PREFIX}\${_tbb_component}_debug.${TBB_LIB_EXT}\")"
|
|
"set(_tbb_debug_lib \"\${_tbb_root}/debug/lib/${TBB_LIB_PREFIX}\${_tbb_component}_debug.${TBB_LIB_EXT}\")"
|
|
_contents
|
|
"${_contents}"
|
|
)
|
|
string(REPLACE "SHARED IMPORTED)" "UNKNOWN IMPORTED)" _contents "${_contents}")
|
|
file(WRITE ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake "${_contents}")
|
|
|
|
# Handle copyright
|
|
file(COPY ${SOURCE_PATH}/LICENSE ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb)
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/tbb/LICENSE ${CURRENT_PACKAGES_DIR}/share/tbb/copyright)
|
|
|
|
vcpkg_test_cmake(PACKAGE_NAME TBB)
|
|
#
|