mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
Merge branch 'trunk' into parallel-file-ops
This commit is contained in:
commit
b3caf67749
1315
CHANGELOG.md
1315
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
158
docs/examples/overlay-triplets-linux-dynamic.md
Normal file
158
docs/examples/overlay-triplets-linux-dynamic.md
Normal file
@ -0,0 +1,158 @@
|
||||
# Overlay triplets example: build dynamic libraries on Linux
|
||||
|
||||
Using **vcpkg** you can build libraries for the following triplets:
|
||||
|
||||
<div>
|
||||
<ul style="columns: 3;">
|
||||
<li> arm-uwp</li>
|
||||
<li> arm-windows</li>
|
||||
<li> arm64-uwp</li>
|
||||
<li> arm64-windows</li>
|
||||
<li> x86-uwp</li>
|
||||
<li> x86-windows</li>
|
||||
<li> x86-windows-static</li>
|
||||
<li> x64-uwp</li>
|
||||
<li> x64-linux</li>
|
||||
<li> x64-osx</li>
|
||||
<li> x64-windows</li>
|
||||
<li> x64-windows-static</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
By design **vcpkg** builds only static libraries for Linux and Mac OS.
|
||||
However, this doesn't mean that you cannot use **vcpkg** to build your dynamic libraries on these platforms.
|
||||
|
||||
This document will guide you through creating your own custom triplets to build dynamic libraries on Linux using **vcpkg**.
|
||||
|
||||
### Step 1: Create a folder to contain your custom triplets
|
||||
|
||||
```
|
||||
~/vcpkg$ mkdir ../custom-triplets
|
||||
```
|
||||
|
||||
### Step 2: Create the custom triplet files
|
||||
|
||||
To save time, copy the existing `x64-linux.cmake` triplet file.
|
||||
|
||||
```
|
||||
~/vcpkg$ cp ./triplets/x64-linux.cmake ../custom-triplets/x64-linux-dynamic.cmake
|
||||
```
|
||||
|
||||
And modify `custom-triplets/x64-linux-dynamic.cmake` to match the contents below:
|
||||
```
|
||||
set(VCPKG_TARGET_ARCHITECTURE x64)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
# Change VCPKG_LIBRARY_LINKAGE from static to dynamic
|
||||
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
||||
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
|
||||
```
|
||||
|
||||
### Step 3: Use `--overlay-triplets` to build dynamic libraries
|
||||
|
||||
Use the `--overlay-triplets` option to include the triplets in the `custom-triplets` directory.
|
||||
|
||||
```
|
||||
./vcpkg install sqlite3:x64-linux-dynamic --overlay-triplets=../custom-triplets
|
||||
The following packages will be built and installed:
|
||||
sqlite3[core]:x64-linux
|
||||
Starting package 1/1: sqlite3:x64-linux-dynamic
|
||||
Building package sqlite3[core]:x64-linux-dynamic...
|
||||
-- Loading triplet configuration from: /home/custom-triplets/x64-linux-dynamic.cmake
|
||||
-- Downloading https://sqlite.org/2019/sqlite-amalgamation-3280000.zip...
|
||||
-- Extracting source /home/victor/git/vcpkg/downloads/sqlite-amalgamation-3280000.zip
|
||||
-- Applying patch fix-arm-uwp.patch
|
||||
-- Using source at /home/victor/git/vcpkg/buildtrees/sqlite3/src/3280000-6a3ff7ce92
|
||||
-- Configuring x64-linux-dynamic-dbg
|
||||
-- Configuring x64-linux-dynamic-rel
|
||||
-- Building x64-linux-dynamic-dbg
|
||||
-- Building x64-linux-dynamic-rel
|
||||
-- Performing post-build validation
|
||||
-- Performing post-build validation done
|
||||
Building package sqlite3[core]:x64-linux-dynamic... done
|
||||
Installing package sqlite3[core]:x64-linux-dynamic...
|
||||
Installing package sqlite3[core]:x64-linux-dynamic... done
|
||||
Elapsed time for package sqlite3:x64-linux-dynamic: 44.82 s
|
||||
|
||||
Total elapsed time: 44.82 s
|
||||
|
||||
The package sqlite3:x64-linux-dynamic provides CMake targets:
|
||||
|
||||
find_package(sqlite3 CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE sqlite3)
|
||||
```
|
||||
|
||||
Overlay triplets will add your custom triplet files when using `vcpkg install`, `vcpkg update`, `vcpkg upgrade`, and `vcpkg remove`.
|
||||
|
||||
When using the `--overlay-triplets` option, a message like the following lets you know that a custom triplet is being used:
|
||||
|
||||
```
|
||||
-- Loading triplet configuration from: /home/custom-triplets/x64-linux-dynamic.cmake
|
||||
```
|
||||
|
||||
## Overriding default triplets
|
||||
|
||||
As you may have noticed, the default triplets for Windows (`x86-windows` and `x64-windows`) install dynamic libraries, while a suffix (`-static`) is needed for static libraries. This is inconsistent with Linux and Mac OS where only static libraries are built.
|
||||
|
||||
Using `--overlay-ports` it is possible to override the default triplets to accomplish the same behavior on Linux:
|
||||
|
||||
* `x64-linux`: Builds dynamic libraries,
|
||||
* `x64-linux-static`: Builds static libraries.
|
||||
|
||||
### Step 1: Create the overriden triplet
|
||||
|
||||
Using the custom triplet created in the previous example, rename `custom-triplets/x64-linux-dynamic.cmake` to `custom-triplets/x64-linux.cmake`.
|
||||
|
||||
```
|
||||
~/vcpkg$ mv ../custom-triplets/x64-linux-dynamic.cmake ../custom-triplets/x64-linux.cmake
|
||||
```
|
||||
|
||||
### Step 2: Copy and rename the default triplet
|
||||
|
||||
Then, copy the default `x64-linux` triplet (which builds static libraries) in your `/custom-triplets` folder and rename it to `x64-linux-static.cmake`.
|
||||
|
||||
```
|
||||
~/vcpkg$ cp ./triplets/x64-linux.cmake ../custom-triplets/x64-linux-static.cmake
|
||||
```
|
||||
|
||||
### Step 3: Use `--overlay-ports` to override default triplets
|
||||
|
||||
Use the `--overlay-triplets` option to include the triplets in the `custom-triplets` directory.
|
||||
|
||||
```
|
||||
./vcpkg install sqlite3:x64-linux --overlay-triplets=../custom-triplets
|
||||
The following packages will be built and installed:
|
||||
sqlite3[core]:x64-linux
|
||||
Starting package 1/1: sqlite3:x64-linux
|
||||
Building package sqlite3[core]:x64-linux...
|
||||
-- Loading triplet configuration from: /home/custom-triplets/x64-linux.cmake
|
||||
-- Downloading https://sqlite.org/2019/sqlite-amalgamation-3280000.zip...
|
||||
-- Extracting source /home/victor/git/vcpkg/downloads/sqlite-amalgamation-3280000.zip
|
||||
-- Applying patch fix-arm-uwp.patch
|
||||
-- Using source at /home/victor/git/vcpkg/buildtrees/sqlite3/src/3280000-6a3ff7ce92
|
||||
-- Configuring x64-linux-dbg
|
||||
-- Configuring x64-linux-rel
|
||||
-- Building x64-linux-dbg
|
||||
-- Building x64-linux-rel
|
||||
-- Performing post-build validation
|
||||
-- Performing post-build validation done
|
||||
Building package sqlite3[core]:x64-linux... done
|
||||
Installing package sqlite3[core]:x64-linux...
|
||||
Installing package sqlite3[core]:x64-linux... done
|
||||
Elapsed time for package sqlite3:x64-linux: 44.82 s
|
||||
|
||||
Total elapsed time: 44.82 s
|
||||
|
||||
The package sqlite3:x64-linux provides CMake targets:
|
||||
|
||||
find_package(sqlite3 CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE sqlite3)
|
||||
```
|
||||
|
||||
Note that the default triplet is masked by your custom triplet:
|
||||
|
||||
```
|
||||
-- Loading triplet configuration from: /home/custom-triplets/x64-linux.cmake
|
||||
```
|
@ -1,93 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
project(abseil CXX)
|
||||
|
||||
add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
||||
set(CMAKE_DEBUG_POSTFIX d)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
option(INSTALL_HEADERS "Install header files" ON)
|
||||
else()
|
||||
option(INSTALL_HEADERS "Install header files" OFF)
|
||||
endif()
|
||||
|
||||
function(add_sublibrary LIB)
|
||||
file(GLOB_RECURSE SOURCES "absl/${LIB}/*.cc")
|
||||
list(FILTER SOURCES EXCLUDE REGEX "_test(ing)?(_.+)?.cc$|_nonprod.cc$|test_util.cc$|_benchmark.cc$")
|
||||
file(GLOB_RECURSE HEADERS "absl/${LIB}/*.h" "absl/${LIB}/*.inc")
|
||||
|
||||
if(SOURCES)
|
||||
if("STATIC" IN_LIST ARGN)
|
||||
add_library(${LIB} STATIC ${SOURCES})
|
||||
else()
|
||||
add_library(${LIB} ${SOURCES})
|
||||
endif()
|
||||
set_target_properties(${LIB} PROPERTIES OUTPUT_NAME "absl_${LIB}")
|
||||
target_include_directories(${LIB} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include>)
|
||||
else()
|
||||
add_library(${LIB} INTERFACE)
|
||||
target_include_directories(${LIB} INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include>)
|
||||
endif()
|
||||
|
||||
install(TARGETS ${LIB} EXPORT unofficial-abseil-targets
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
if(INSTALL_HEADERS)
|
||||
if(HEADERS)
|
||||
foreach(file IN LISTS HEADERS)
|
||||
get_filename_component(dir ${file} DIRECTORY)
|
||||
file(RELATIVE_PATH rel_dir ${CMAKE_SOURCE_DIR}/absl/${LIB} ${dir})
|
||||
install(FILES ${file} DESTINATION "include/absl/${LIB}/${rel_dir}")
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(target_link_public_libraries A)
|
||||
get_target_property(A_TYPE ${A} TYPE)
|
||||
if(A_TYPE STREQUAL INTERFACE_LIBRARY)
|
||||
target_link_libraries(${A} INTERFACE ${ARGN})
|
||||
else()
|
||||
target_link_libraries(${A} PUBLIC ${ARGN})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
add_sublibrary(algorithm)
|
||||
add_sublibrary(base)
|
||||
add_sublibrary(container STATIC)
|
||||
add_sublibrary(debugging)
|
||||
add_sublibrary(hash)
|
||||
add_sublibrary(memory)
|
||||
add_sublibrary(meta)
|
||||
add_sublibrary(numeric)
|
||||
add_sublibrary(strings)
|
||||
add_sublibrary(synchronization STATIC)
|
||||
# Time must be static because there are global variables intended for export
|
||||
add_sublibrary(time STATIC)
|
||||
add_sublibrary(types)
|
||||
add_sublibrary(utility)
|
||||
|
||||
target_link_public_libraries(algorithm base meta)
|
||||
target_link_public_libraries(container algorithm base memory time)
|
||||
target_link_public_libraries(debugging base)
|
||||
target_link_public_libraries(hash base)
|
||||
target_link_public_libraries(memory meta)
|
||||
target_link_public_libraries(meta base)
|
||||
target_link_public_libraries(numeric base)
|
||||
target_link_public_libraries(strings base memory meta numeric)
|
||||
target_link_public_libraries(types base utility meta algorithm strings)
|
||||
target_link_public_libraries(utility base meta)
|
||||
target_link_public_libraries(time base numeric)
|
||||
target_link_public_libraries(synchronization base time)
|
||||
|
||||
install(
|
||||
EXPORT unofficial-abseil-targets
|
||||
FILE unofficial-abseil-config.cmake
|
||||
NAMESPACE unofficial::abseil::
|
||||
DESTINATION share/unofficial-abseil
|
||||
)
|
@ -15,17 +15,19 @@ vcpkg_from_github(
|
||||
PATCHES fix-usage-lnk-error.patch
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-abseil TARGET_PATH share/unofficial-abseil)
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/absl)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/abseil RENAME copyright)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share
|
||||
${CURRENT_PACKAGES_DIR}/debug/include
|
||||
${CURRENT_PACKAGES_DIR}/include/absl/copts
|
||||
${CURRENT_PACKAGES_DIR}/include/absl/strings/testdata
|
||||
${CURRENT_PACKAGES_DIR}/include/absl/time/internal/cctz/testdata)
|
@ -1,4 +1,4 @@
|
||||
Source: armadillo
|
||||
Version: 2019-04-16-3
|
||||
Version: 2019-04-16-4
|
||||
Description: Armadillo is a high quality linear algebra library (matrix maths) for the C++ language, aiming towards a good balance between speed and ease of use
|
||||
Build-Depends: openblas (!osx), clapack (!osx)
|
||||
|
13
ports/armadillo/fix-CMakePath.patch
Normal file
13
ports/armadillo/fix-CMakePath.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9fea721..e6a273d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -473,7 +473,7 @@ install(EXPORT ArmadilloLibraryDepends DESTINATION
|
||||
# and install it
|
||||
set(ARMADILLO_INCLUDE_DIRS "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
|
||||
set(ARMADILLO_LIB_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
|
||||
-set(ARMADILLO_CMAKE_DIR "${CMAKE_INSTALL_FULL_DATADIR}/Armadillo/CMake")
|
||||
+set(ARMADILLO_CMAKE_DIR "${CMAKE_INSTALL_FULL_DATADIR}/Armadillo")
|
||||
|
||||
|
||||
message(STATUS "Generating '${PROJECT_BINARY_DIR}/InstallFiles/ArmadilloConfig.cmake'")
|
@ -11,6 +11,7 @@ vcpkg_from_gitlab(
|
||||
HEAD_REF 9.400.x
|
||||
PATCHES
|
||||
remove_custom_modules.patch
|
||||
fix-CMakePath.patch
|
||||
)
|
||||
|
||||
file(REMOVE ${SOURCE_PATH}/cmake_aux/Modules/ARMA_FindBLAS.cmake)
|
||||
@ -31,6 +32,13 @@ vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/Armadillo)
|
||||
|
||||
file(GLOB SHARE_CONTENT ${CURRENT_PACKAGES_DIR}/share/Armadillo)
|
||||
list(LENGTH SHARE_CONTENT SHARE_LEN)
|
||||
if(SHARE_LEN EQUAL 0)
|
||||
# On case sensitive file system there is an extra empty directory created that should be removed
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/Armadillo)
|
||||
endif()
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/armadillo)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/armadillo RENAME copyright)
|
||||
|
4
ports/armadillo/usage
Normal file
4
ports/armadillo/usage
Normal file
@ -0,0 +1,4 @@
|
||||
The package armadillo provides CMake targets:
|
||||
|
||||
find_package(Armadillo CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE ${ARMADILLO_LIBRARIES})
|
5
ports/basisu/CONTROL
Normal file
5
ports/basisu/CONTROL
Normal file
@ -0,0 +1,5 @@
|
||||
Source: basisu
|
||||
Version: 0.0.1
|
||||
Homepage: https://github.com/BinomialLLC/basis_universal
|
||||
Description: Basis Universal is a supercompressed GPU texture and video compression format that outputs a highly compressed intermediate file format (.basis) that can be quickly transcoded to a wide variety of GPU texture compression formats.
|
||||
Build-Depends: lodepng
|
41
ports/basisu/portfile.cmake
Normal file
41
ports/basisu/portfile.cmake
Normal file
@ -0,0 +1,41 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO jherico/basis_universal
|
||||
REF 11aa181a4bbf051475a01a1e73e39bf388819215
|
||||
SHA512 62d7de6c6ca5e6235c8a377767389a7d5393e05bb5d0c024ce756e77d235132efa48280c9d529b6a91eddf0c906c3c84b6b78fdf339b1a47039b28d04161d2fe
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
-DBUILD_TESTS=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
#vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/basisu)
|
||||
if (WIN32)
|
||||
set(TOOL_NAME basisu_tool.exe)
|
||||
else()
|
||||
set(TOOL_NAME basisu_tool)
|
||||
endif()
|
||||
|
||||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/basisu)
|
||||
file(COPY ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/basisu)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/basisu/LICENSE ${CURRENT_PACKAGES_DIR}/share/basisu/copyright)
|
||||
|
||||
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/basisu)
|
||||
|
||||
# Remove unnecessary files
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME})
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME})
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
|
||||
vcpkg_copy_pdbs()
|
@ -1,10 +1,10 @@
|
||||
Source: blend2d
|
||||
Version: beta_2019-04-30
|
||||
Version: beta_2019-07-16
|
||||
Description: Beta 2D Vector Graphics Powered by a JIT Compiler
|
||||
Default-Features: jit, logging
|
||||
|
||||
Feature: jit
|
||||
Description: asmjit is used to jit compile pipelines
|
||||
Description: Default feature. Enables jit pipeline compilation. Not supported for ARM and UWP.
|
||||
|
||||
Feature: logging
|
||||
Description: enables logging
|
||||
Description: Default feature. Enables logging.
|
||||
|
@ -3,12 +3,12 @@ include(vcpkg_common_functions)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO blend2d/blend2d
|
||||
REF 69141350b5a654f328c8529ae301aa1e6bad5342
|
||||
SHA512 d9bdd234f443c0ef8793dba1a76cc567bab3f9cf32d835d9e285f7ad946a56e0bc03eab30f61bbce51318e18a74ecfcfc965ac94e1ff6cef21e9b3ccc6a42120
|
||||
REF 934d07161971aeef5c4ac3b15e69ff57929445ac
|
||||
SHA512 71b17611c20a8a7d27a37b0984918ce4ed608d8d2d053d116cd4c0ca9b7fcad742f39ef9939d9addf600113c2ad399d1dc4ee72b5f036ccda58b7d4237316928
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BLEND2D_BUILD_STATIC)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BLEND2D_STATIC)
|
||||
|
||||
if(NOT ("jit" IN_LIST FEATURES))
|
||||
set(BLEND2D_BUILD_NO_JIT TRUE)
|
||||
@ -17,14 +17,13 @@ if(NOT ("logging" IN_LIST FEATURES))
|
||||
set(BLEND2D_BUILD_NO_LOGGING TRUE)
|
||||
endif()
|
||||
|
||||
|
||||
if(NOT BLEND2D_BUILD_NO_JIT)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH ASMJIT_SOURCE_PATH
|
||||
REPO asmjit/asmjit
|
||||
REF f4e685cef003c40ad0d348d0c9eb2a1fe63d8521
|
||||
SHA512 77981fc32e746fc88f5707b4a8e8557283261b2657248f0d4900f47bd500de4efe47619a53f32413ea3c6f116e084cac6fdb48b6b92d75e824585d94c785d2b1
|
||||
HEAD_REF next-wip
|
||||
REF 5d40561d14f93dc45613bfa03155d1dfb4f5825a
|
||||
SHA512 88f16fc1ff8e9eb1b8d7441d7bd2e08d238a2104f3de94aaa16972faac704bf526996fa1556a3831701fb370f051df6839b4058690cf2f49ea5aeb1224c84fe0
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/asmjit)
|
||||
@ -38,7 +37,7 @@ vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DBLEND2D_BUILD_STATIC=${BLEND2D_BUILD_STATIC}
|
||||
-DBLEND2D_STATIC=${BLEND2D_STATIC}
|
||||
-DBLEND2D_BUILD_NO_JIT=${BLEND2D_BUILD_NO_JIT}
|
||||
-DBLEND2D_BUILD_NO_LOGGING=${BLEND2D_BUILD_NO_LOGGING}
|
||||
)
|
||||
@ -50,11 +49,16 @@ vcpkg_copy_pdbs()
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
|
||||
if(BLEND2D_BUILD_STATIC)
|
||||
if(BLEND2D_STATIC)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/blend2d RENAME copyright)
|
||||
configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
||||
|
||||
if(BLEND2D_STATIC)
|
||||
# Install usage
|
||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY)
|
||||
endif()
|
||||
|
1
ports/blend2d/usage
Normal file
1
ports/blend2d/usage
Normal file
@ -0,0 +1 @@
|
||||
Define BL_STATIC before any @PORT@ includes.
|
@ -1,6 +1,6 @@
|
||||
Source: bond
|
||||
Maintainer: bond@microsoft.com
|
||||
Version: 8.1.0
|
||||
Description: Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services.
|
||||
Homepage: https://github.com/Microsoft/bond
|
||||
Build-Depends: rapidjson, boost-config, boost-utility, boost-assign
|
||||
Source: bond
|
||||
Maintainer: bond@microsoft.com
|
||||
Version: 8.1.0-2
|
||||
Description: Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services.
|
||||
Homepage: https://github.com/Microsoft/bond
|
||||
Build-Depends: rapidjson, boost-config, boost-utility, boost-assign
|
||||
|
@ -29,22 +29,11 @@ if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "windows" OR
|
||||
endif()
|
||||
|
||||
else()
|
||||
message(STATUS "Installing stack...")
|
||||
vcpkg_download_distfile(
|
||||
ARCHIVE
|
||||
URLS "https://get.haskellstack.org/"
|
||||
FILENAME "stack-install.sh"
|
||||
SHA512 6db2008297416ad856aa498908bf695737cf3cc466440397720a458358e9661d07abdba762662080ee8bbd8171cdcb05eec6d3696382575c099adfb8427e05fd
|
||||
)
|
||||
|
||||
set(BASH /bin/bash)
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${BASH} --noprofile --norc "${ARCHIVE}" -f
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}
|
||||
LOGNAME install-stack
|
||||
)
|
||||
|
||||
# According to the readme on https://github.com/microsoft/bond/
|
||||
# The build needs a version of the Haskel Tool stack that is newer than some distros ship with.
|
||||
# For this reason the message is not guarded by checking to see if the tool is installed.
|
||||
message("\nA recent version of Haskell Tool Stack is required to build.\n For information on how to install see https://docs.haskellstack.org/en/stable/README/\n")
|
||||
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
|
||||
Source: boost-asio
|
||||
Version: 1.70.0-1
|
||||
Version: 1.70.0-2
|
||||
Build-Depends: boost-array, boost-assert, boost-bind, boost-chrono, boost-compatibility, boost-config, boost-coroutine (!uwp), boost-date-time, boost-detail, boost-function, boost-integer, boost-regex, boost-smart-ptr, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, openssl
|
||||
Homepage: https://github.com/boostorg/asio
|
||||
Description: Boost asio module
|
||||
|
@ -8,6 +8,7 @@ vcpkg_from_github(
|
||||
REF boost-1.70.0
|
||||
SHA512 394c7e557d97bbb8b98453846a098c8ab7f4eb92d752bd4089d2020e0d5060cff1e53f5e50b2f8910e64b66c934b2bde4a7137bd1a6050e8b1279c2e4576b2e5
|
||||
HEAD_REF master
|
||||
PATCHES windows_alloca_header.patch
|
||||
)
|
||||
|
||||
include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake)
|
||||
|
15
ports/boost-asio/windows_alloca_header.patch
Normal file
15
ports/boost-asio/windows_alloca_header.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/include/boost/asio/detail/impl/socket_ops.ipp b/include/boost/asio/detail/impl/socket_ops.ipp
|
||||
index 7d7c31f..d2cd468 100644
|
||||
--- a/include/boost/asio/detail/impl/socket_ops.ipp
|
||||
+++ b/include/boost/asio/detail/impl/socket_ops.ipp
|
||||
@@ -27,6 +27,10 @@
|
||||
#include <boost/asio/detail/socket_ops.hpp>
|
||||
#include <boost/asio/error.hpp>
|
||||
|
||||
+#if defined(BOOST_ASIO_WINDOWS)
|
||||
+#include <malloc.h>
|
||||
+#endif
|
||||
+
|
||||
#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
|
||||
# include <codecvt>
|
||||
# include <locale>
|
@ -1,6 +1,6 @@
|
||||
# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
|
||||
Source: boost-type-erasure
|
||||
Version: 1.70.0
|
||||
Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-fusion, boost-iterator, boost-modular-build-helper, boost-mp11, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-thread (!arm), boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-vmd
|
||||
Version: 1.70.0-1
|
||||
Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-fusion, boost-iterator, boost-modular-build-helper, boost-mp11, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-thread, boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-vmd
|
||||
Homepage: https://github.com/boostorg/type_erasure
|
||||
Description: Boost type_erasure module
|
||||
|
@ -15,7 +15,7 @@ vcpkg_from_github(
|
||||
if(CMAKE_HOST_WIN32)
|
||||
vcpkg_find_acquire_program(JOM)
|
||||
set(build_tool "${JOM}")
|
||||
set(parallel_build "/J ${VCPKG_CONCURRENCY}")
|
||||
set(parallel_build "/J${VCPKG_CONCURRENCY}")
|
||||
else()
|
||||
find_program(MAKE make)
|
||||
set(build_tool "${MAKE}")
|
||||
@ -87,8 +87,8 @@ function(BOTAN_BUILD BOTAN_BUILD_TYPE)
|
||||
|
||||
message(STATUS "Build ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}")
|
||||
vcpkg_execute_build_process(
|
||||
COMMAND ${build_tool}
|
||||
NO_PARALLEL_COMMAND "${build_tool} ${parallel_build}"
|
||||
COMMAND "${build_tool}" ${parallel_build}
|
||||
NO_PARALLEL_COMMAND "${build_tool}"
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}"
|
||||
LOGNAME build-${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE})
|
||||
message(STATUS "Build ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE} done")
|
||||
|
@ -1,5 +1,5 @@
|
||||
Source: clapack
|
||||
Version: 3.2.1-9
|
||||
Version: 3.2.1-10
|
||||
Homepage: https://www.netlib.org/clapack
|
||||
Description: CLAPACK (f2c'ed version of LAPACK)
|
||||
Build-Depends: openblas (!osx)
|
||||
|
@ -1,237 +1,468 @@
|
||||
#.rst:
|
||||
# clapack config for vcpkg
|
||||
# ------------
|
||||
#
|
||||
# Find the clapack includes and library.
|
||||
#
|
||||
# Result Variables
|
||||
# ^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# This script defines the following variables:
|
||||
#
|
||||
# ``CLAPACK_FOUND``
|
||||
# True if clapack library found
|
||||
#
|
||||
# ``CLAPACK_VERSION``
|
||||
# Containing the clapack version tag (manually defined)
|
||||
#
|
||||
# ``CLAPACK_INCLUDE_DIR``
|
||||
# Location of clapack headers
|
||||
#
|
||||
# ``CLAPACK_LIBRARY``
|
||||
# List of libraries to link with when using clapack
|
||||
#
|
||||
# Result Targets
|
||||
# ^^^^^^^^^^^^^^
|
||||
#
|
||||
# This script defines the following targets:
|
||||
#
|
||||
# ``clapack::clapack``
|
||||
# Target to use clapack
|
||||
#
|
||||
# Compatibility Variables
|
||||
# ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# This script defines the following variables for compatibility reasons:
|
||||
#
|
||||
# ``F2C_FOUND``
|
||||
# True if f2c (fortran-to-c wrap layer) library found
|
||||
#
|
||||
# ``F2C_INCLUDE_DIR``
|
||||
# Location of clapack headers
|
||||
#
|
||||
# ``F2C_LIBRARY``
|
||||
# Library containing the fortran-to-c wrap layer, necessary for clapack and automatically included when used
|
||||
#
|
||||
# ``LAPACK_FOUND``
|
||||
# True if clapack library found
|
||||
#
|
||||
# ``LAPACK_VERSION``
|
||||
# Containing the clapack version tag (manually defined)
|
||||
#
|
||||
# ``LAPACK_INCLUDE_DIR``
|
||||
# Location of clapack headers
|
||||
#
|
||||
# ``LAPACK_LIBRARY``
|
||||
# List of libraries to link with when using clapack
|
||||
#
|
||||
# Compatibility Targets
|
||||
# ^^^^^^^^^^^^^^
|
||||
#
|
||||
# This script defines the following targets for compatibility reasons:
|
||||
#
|
||||
# ``lapack``
|
||||
# Target to use lapack
|
||||
|
||||
include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake)
|
||||
include(${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake)
|
||||
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
|
||||
include(${CMAKE_ROOT}/Modules/CMakeFindDependencyMacro.cmake)
|
||||
|
||||
set(CLAPACK_VERSION "3.2.1")
|
||||
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||
find_dependency(Threads)
|
||||
|
||||
if(UNIX)
|
||||
find_library(ADDITIONAL_LAPACK_LIBRARY m)
|
||||
set(PTHREAD_LINK_NAME "-pthread")
|
||||
endif()
|
||||
|
||||
if(NOT F2C_LIBRARY)
|
||||
find_library(F2C_LIBRARY_RELEASE NAMES f2c libf2c)
|
||||
find_library(F2C_LIBRARY_DEBUG NAMES f2cd libf2cd)
|
||||
select_library_configurations(F2C)
|
||||
|
||||
#keep a list of "pure" f2c libs, without dependencies
|
||||
set(oF2C_LIBRARY_RELEASE ${F2C_LIBRARY_RELEASE})
|
||||
set(oF2C_LIBRARY_DEBUG ${F2C_LIBRARY_DEBUG})
|
||||
set(oF2C_LIBRARY ${F2C_LIBRARY})
|
||||
|
||||
list(APPEND F2C_LIBRARY ${ADDITIONAL_LAPACK_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(NOT LAPACK_LIBRARY)
|
||||
find_library(LAPACK_LIBRARY_RELEASE NAMES lapack)
|
||||
find_library(LAPACK_LIBRARY_DEBUG NAMES lapackd)
|
||||
|
||||
#keep a list of "pure" lapack libs, without dependencies
|
||||
set(oLAPACK_LIBRARY_RELEASE ${LAPACK_LIBRARY_RELEASE})
|
||||
set(oLAPACK_LIBRARY_DEBUG ${LAPACK_LIBRARY_DEBUG})
|
||||
select_library_configurations(oLAPACK)
|
||||
|
||||
list(APPEND LAPACK_LIBRARY_RELEASE ${F2C_LIBRARY_RELEASE})
|
||||
list(APPEND LAPACK_LIBRARY_DEBUG ${F2C_LIBRARY_DEBUG})
|
||||
|
||||
find_dependency(BLAS)
|
||||
get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_IMPLIB_RELEASE)
|
||||
if(NOT _loc)
|
||||
get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY LOCATION_RELEASE)
|
||||
endif()
|
||||
set(LAPACK_BLAS_LIBRARY_RELEASE ${_loc})
|
||||
get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_IMPLIB_DEBUG)
|
||||
if(NOT _loc)
|
||||
get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY LOCATION_DEBUG)
|
||||
endif()
|
||||
set(LAPACK_BLAS_LIBRARY_DEBUG ${_loc})
|
||||
select_library_configurations(LAPACK_BLAS)
|
||||
list(APPEND LAPACK_LIBRARY_RELEASE ${LAPACK_BLAS_LIBRARY_RELEASE})
|
||||
list(APPEND LAPACK_LIBRARY_DEBUG ${LAPACK_BLAS_LIBRARY_DEBUG})
|
||||
|
||||
select_library_configurations(LAPACK)
|
||||
list(APPEND LAPACK_LIBRARY Threads::Threads)
|
||||
endif()
|
||||
|
||||
if(NOT F2C_INCLUDE_DIR)
|
||||
find_path(F2C_INCLUDE_DIR NAMES f2c.h)
|
||||
endif()
|
||||
|
||||
if(NOT LAPACK_INCLUDE_DIR)
|
||||
find_path(LAPACK_INCLUDE_DIR NAMES clapack.h)
|
||||
endif()
|
||||
|
||||
list(APPEND LAPACK_INCLUDE_DIR ${F2C_INCLUDE_DIR})
|
||||
set(LAPACK_INCLUDE_DIR "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE)
|
||||
set(LAPACK_INCLUDE_DIRS "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE)
|
||||
set(CLAPACK_INCLUDE_DIR "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE)
|
||||
set(CLAPACK_INCLUDE_DIRS "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE)
|
||||
set(F2C_INCLUDE_DIRS "${F2C_INCLUDE_DIR}" CACHE PATH "" FORCE)
|
||||
|
||||
set(LAPACK_DLL_DIR ${LAPACK_INCLUDE_DIR})
|
||||
list(TRANSFORM LAPACK_DLL_DIR APPEND "/../bin")
|
||||
message(STATUS "LAPACK_DLL_DIR: ${LAPACK_DLL_DIR}")
|
||||
|
||||
if(WIN32)
|
||||
find_file(LAPACK_LIBRARY_RELEASE_DLL NAMES lapack.dll PATHS ${LAPACK_DLL_DIR})
|
||||
find_file(LAPACK_LIBRARY_DEBUG_FOLDER NAMES lapackd.dll PATHS ${LAPACK_DLL_DIR})
|
||||
find_file(F2C_LIBRARY_RELEASE_DLL NAMES f2c.dll libf2c.dll PATHS ${LAPACK_DLL_DIR})
|
||||
find_file(F2C_LIBRARY_DEBUG_DLL NAMES f2cd.dll libf2cd.dll PATHS ${LAPACK_DLL_DIR})
|
||||
endif()
|
||||
|
||||
set(LAPACK_BLAS_LIBRARY "${LAPACK_BLAS_LIBRARY}" CACHE STRING "" FORCE)
|
||||
set(F2C_LIBRARIES "${F2C_LIBRARY}" CACHE STRING "" FORCE)
|
||||
set(LAPACK_VERSION "${CLAPACK_VERSION}" CACHE STRING "" FORCE)
|
||||
set(LAPACK_LIBRARIES "${LAPACK_LIBRARY}" CACHE STRING "" FORCE)
|
||||
set(CLAPACK_LIBRARY "${LAPACK_LIBRARY}" CACHE STRING "" FORCE)
|
||||
set(CLAPACK_LIBRARIES "${LAPACK_LIBRARY}" CACHE STRING "" FORCE)
|
||||
|
||||
set(LAPACK_LIBRARY "${LAPACK_LIBRARY}" CACHE STRING "" FORCE)
|
||||
set(F2C_LIBRARY "${F2C_LIBRARY}" CACHE STRING "" FORCE)
|
||||
set(LAPACK_LIBRARY_RELEASE "${LAPACK_LIBRARY_RELEASE}" CACHE STRING "" FORCE)
|
||||
set(LAPACK_LIBRARY_DEBUG "${LAPACK_LIBRARY_DEBUG}" CACHE STRING "" FORCE)
|
||||
set(F2C_LIBRARY_RELEASE "${F2C_LIBRARY_RELEASE}" CACHE STRING "" FORCE)
|
||||
set(F2C_LIBRARY_DEBUG "${F2C_LIBRARY_DEBUG}" CACHE STRING "" FORCE)
|
||||
|
||||
find_package_handle_standard_args(CLAPACK DEFAULT_MSG CLAPACK_LIBRARY CLAPACK_INCLUDE_DIR)
|
||||
mark_as_advanced(CLAPACK_INCLUDE_DIR CLAPACK_LIBRARY)
|
||||
|
||||
find_package_handle_standard_args(LAPACK DEFAULT_MSG LAPACK_LIBRARY LAPACK_INCLUDE_DIR)
|
||||
mark_as_advanced(LAPACK_INCLUDE_DIR LAPACK_LIBRARY)
|
||||
|
||||
find_package_handle_standard_args(F2C DEFAULT_MSG F2C_LIBRARY F2C_INCLUDE_DIR)
|
||||
mark_as_advanced(F2C_INCLUDE_DIR F2C_LIBRARY)
|
||||
|
||||
#TARGETS
|
||||
if(CLAPACK_FOUND AND NOT TARGET clapack::clapack)
|
||||
if(EXISTS "${LAPACK_LIBRARY_RELEASE_DLL}")
|
||||
add_library(clapack::clapack SHARED IMPORTED)
|
||||
set_target_properties(clapack::clapack PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE_DLL}"
|
||||
IMPORTED_IMPLIB_RELEASE "${oLAPACK_LIBRARY_RELEASE}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES "$<$<NOT:$<CONFIG:DEBUG>>:${oF2C_LIBRARY_RELEASE}>;$<$<CONFIG:DEBUG>:${oF2C_LIBRARY_DEBUG}>;$<$<NOT:$<CONFIG:DEBUG>>:${LAPACK_BLAS_LIBRARY_RELEASE}>;$<$<CONFIG:DEBUG>:${LAPACK_BLAS_LIBRARY_DEBUG}>;$<LINK_ONLY:${ADDITIONAL_LAPACK_LIBRARY}>;$<LINK_ONLY:${PTHREAD_LINK_NAME}>"
|
||||
IMPORTED_CONFIGURATIONS Release
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C")
|
||||
if(EXISTS "${LAPACK_LIBRARY_DEBUG_DLL}")
|
||||
set_property(TARGET clapack::clapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug)
|
||||
set_target_properties(clapack::clapack PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG_DLL}"
|
||||
IMPORTED_IMPLIB_DEBUG "${oLAPACK_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
else()
|
||||
add_library(clapack::clapack UNKNOWN IMPORTED)
|
||||
set_target_properties(clapack::clapack PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${oLAPACK_LIBRARY_RELEASE}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES "$<$<NOT:$<CONFIG:DEBUG>>:${oF2C_LIBRARY_RELEASE}>;$<$<CONFIG:DEBUG>:${oF2C_LIBRARY_DEBUG}>;$<$<NOT:$<CONFIG:DEBUG>>:${LAPACK_BLAS_LIBRARY_RELEASE}>;$<$<CONFIG:DEBUG>:${LAPACK_BLAS_LIBRARY_DEBUG}>;$<LINK_ONLY:${ADDITIONAL_LAPACK_LIBRARY}>;$<LINK_ONLY:${PTHREAD_LINK_NAME}>"
|
||||
IMPORTED_CONFIGURATIONS Release
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C")
|
||||
if(EXISTS "${LAPACK_LIBRARY_DEBUG}")
|
||||
set_property(TARGET clapack::clapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug)
|
||||
set_target_properties(clapack::clapack PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${oLAPACK_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CLAPACK_FOUND AND NOT TARGET lapack)
|
||||
if(EXISTS "${LAPACK_LIBRARY_RELEASE_DLL}")
|
||||
add_library(lapack SHARED IMPORTED)
|
||||
set_target_properties(lapack PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE_DLL}"
|
||||
IMPORTED_IMPLIB_RELEASE "${oLAPACK_LIBRARY_RELEASE}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES "$<$<NOT:$<CONFIG:DEBUG>>:${oF2C_LIBRARY_RELEASE}>;$<$<CONFIG:DEBUG>:${oF2C_LIBRARY_DEBUG}>;$<$<NOT:$<CONFIG:DEBUG>>:${LAPACK_BLAS_LIBRARY_RELEASE}>;$<$<CONFIG:DEBUG>:${LAPACK_BLAS_LIBRARY_DEBUG}>;$<LINK_ONLY:${ADDITIONAL_LAPACK_LIBRARY}>;$<LINK_ONLY:${PTHREAD_LINK_NAME}>"
|
||||
IMPORTED_CONFIGURATIONS Release
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C")
|
||||
if(EXISTS "${LAPACK_LIBRARY_DEBUG_DLL}")
|
||||
set_property(TARGET lapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug)
|
||||
set_target_properties(lapack PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG_DLL}"
|
||||
IMPORTED_IMPLIB_DEBUG "${oLAPACK_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
else()
|
||||
add_library(lapack UNKNOWN IMPORTED)
|
||||
set_target_properties(lapack PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${oLAPACK_LIBRARY_RELEASE}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}"
|
||||
IMPORTED_CONFIGURATIONS Release
|
||||
INTERFACE_LINK_LIBRARIES "$<$<NOT:$<CONFIG:DEBUG>>:${oF2C_LIBRARY_RELEASE}>;$<$<CONFIG:DEBUG>:${oF2C_LIBRARY_DEBUG}>;$<$<NOT:$<CONFIG:DEBUG>>:${LAPACK_BLAS_LIBRARY_RELEASE}>;$<$<CONFIG:DEBUG>:${LAPACK_BLAS_LIBRARY_DEBUG}>;$<LINK_ONLY:${ADDITIONAL_LAPACK_LIBRARY}>;$<LINK_ONLY:${PTHREAD_LINK_NAME}>"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C")
|
||||
if(EXISTS "${LAPACK_LIBRARY_DEBUG}")
|
||||
set_property(TARGET lapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug)
|
||||
set_target_properties(lapack PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${oLAPACK_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindLAPACK
|
||||
----------
|
||||
|
||||
Find LAPACK library
|
||||
|
||||
This module finds an installed fortran library that implements the
|
||||
LAPACK linear-algebra interface (see http://www.netlib.org/lapack/).
|
||||
|
||||
The approach follows that taken for the autoconf macro file,
|
||||
acx_lapack.m4 (distributed at
|
||||
http://ac-archive.sourceforge.net/ac-archive/acx_lapack.html).
|
||||
|
||||
Input Variables
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
The following variables may be set to influence this module's behavior:
|
||||
|
||||
``BLA_STATIC``
|
||||
if ``ON`` use static linkage
|
||||
|
||||
``BLA_VENDOR``
|
||||
If set, checks only the specified vendor, if not set checks all the
|
||||
possibilities. List of vendors valid in this module:
|
||||
|
||||
* ``Intel10_32`` (intel mkl v10 32 bit)
|
||||
* ``Intel10_64lp`` (intel mkl v10+ 64 bit, threaded code, lp64 model)
|
||||
* ``Intel10_64lp_seq`` (intel mkl v10+ 64 bit, sequential code, lp64 model)
|
||||
* ``Intel10_64ilp`` (intel mkl v10+ 64 bit, threaded code, ilp64 model)
|
||||
* ``Intel10_64ilp_seq`` (intel mkl v10+ 64 bit, sequential code, ilp64 model)
|
||||
* ``Intel`` (obsolete versions of mkl 32 and 64 bit)
|
||||
* ``OpenBLAS``
|
||||
* ``FLAME``
|
||||
* ``ACML``
|
||||
* ``Apple``
|
||||
* ``NAS``
|
||||
* ``Generic``
|
||||
|
||||
``BLA_F95``
|
||||
if ``ON`` tries to find BLAS95/LAPACK95
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines the following variables:
|
||||
|
||||
``LAPACK_FOUND``
|
||||
library implementing the LAPACK interface is found
|
||||
``LAPACK_LINKER_FLAGS``
|
||||
uncached list of required linker flags (excluding -l and -L).
|
||||
``LAPACK_LIBRARIES``
|
||||
uncached list of libraries (using full path name) to link against
|
||||
to use LAPACK
|
||||
``LAPACK95_LIBRARIES``
|
||||
uncached list of libraries (using full path name) to link against
|
||||
to use LAPACK95
|
||||
``LAPACK95_FOUND``
|
||||
library implementing the LAPACK95 interface is found
|
||||
|
||||
.. note::
|
||||
|
||||
C or CXX must be enabled to use Intel MKL
|
||||
|
||||
For example, to use Intel MKL libraries and/or Intel compiler:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
set(BLA_VENDOR Intel10_64lp)
|
||||
find_package(LAPACK)
|
||||
#]=======================================================================]
|
||||
|
||||
set(_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
|
||||
# Check the language being used
|
||||
if( NOT (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED OR CMAKE_Fortran_COMPILER_LOADED) )
|
||||
if(LAPACK_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "FindLAPACK requires Fortran, C, or C++ to be enabled.")
|
||||
else()
|
||||
message(STATUS "Looking for LAPACK... - NOT found (Unsupported languages)")
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (CMAKE_Fortran_COMPILER_LOADED)
|
||||
include(${CMAKE_ROOT}/Modules/CheckFortranFunctionExists.cmake)
|
||||
else ()
|
||||
include(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
|
||||
endif ()
|
||||
include(${CMAKE_ROOT}/Modules/CMakePushCheckState.cmake)
|
||||
include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake)
|
||||
|
||||
cmake_push_check_state()
|
||||
set(CMAKE_REQUIRED_QUIET ${LAPACK_FIND_QUIETLY})
|
||||
|
||||
set(LAPACK_FOUND FALSE)
|
||||
set(LAPACK95_FOUND FALSE)
|
||||
|
||||
# TODO: move this stuff to separate module
|
||||
|
||||
macro(Check_Lapack_Libraries LIBRARIES _prefix _name _flags _list _blas _threads)
|
||||
# This macro checks for the existence of the combination of fortran libraries
|
||||
# given by _list. If the combination is found, this macro checks (using the
|
||||
# Check_Fortran_Function_Exists macro) whether can link against that library
|
||||
# combination using the name of a routine given by _name using the linker
|
||||
# flags given by _flags. If the combination of libraries is found and passes
|
||||
# the link test, LIBRARIES is set to the list of complete library paths that
|
||||
# have been found. Otherwise, LIBRARIES is set to FALSE.
|
||||
|
||||
# N.B. _prefix is the prefix applied to the names of all cached variables that
|
||||
# are generated internally and marked advanced by this macro.
|
||||
|
||||
set(_libraries_work TRUE)
|
||||
set(${LIBRARIES})
|
||||
set(${LIBRARIES}_RELEASE)
|
||||
set(_combined_name)
|
||||
if (NOT _libdir)
|
||||
if (WIN32)
|
||||
set(_libdir ENV LIB)
|
||||
elseif (APPLE)
|
||||
set(_libdir ENV DYLD_LIBRARY_PATH)
|
||||
else ()
|
||||
set(_libdir ENV LD_LIBRARY_PATH)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
list(APPEND _libdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
|
||||
|
||||
foreach(_library ${_list})
|
||||
set(_combined_name ${_combined_name}_${_library})
|
||||
|
||||
if(_libraries_work)
|
||||
if (BLA_STATIC)
|
||||
if (WIN32)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
endif ()
|
||||
if (APPLE)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
else ()
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
endif ()
|
||||
else ()
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
# for ubuntu's libblas3gf and liblapack3gf packages
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf)
|
||||
endif ()
|
||||
endif ()
|
||||
find_library(${_prefix}_${_library}_LIBRARY_RELEASE
|
||||
NAMES ${_library}
|
||||
PATHS ${_libdir}
|
||||
)
|
||||
mark_as_advanced(${_prefix}_${_library}_LIBRARY_RELEASE)
|
||||
find_library(${_prefix}_${_library}_LIBRARY_DEBUG
|
||||
NAMES ${_library}d
|
||||
PATHS ${_libdir}
|
||||
)
|
||||
mark_as_advanced(${_prefix}_${_library}_LIBRARY_DEBUG)
|
||||
select_library_configurations(${_prefix}_${_library})
|
||||
if(NOT ${_prefix}_${_library}_LIBRARY_RELEASE MATCHES "NOTFOUND")
|
||||
set(${LIBRARIES}_RELEASE ${${LIBRARIES}_RELEASE} ${${_prefix}_${_library}_LIBRARY_RELEASE})
|
||||
endif()
|
||||
set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})
|
||||
set(_libraries_work ${${_prefix}_${_library}_LIBRARY})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(_libraries_work)
|
||||
# Test this combination of libraries.
|
||||
if(NOT "${_blas}" STREQUAL "")
|
||||
string(GENEX_STRIP "${_blas}" _test_blas)
|
||||
endif()
|
||||
if(UNIX AND BLA_STATIC)
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${_flags} "-Wl,--start-group" ${${LIBRARIES}_RELEASE} ${_test_blas} "-Wl,--end-group" ${_threads})
|
||||
else()
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}_RELEASE} ${_test_blas} ${_threads})
|
||||
endif()
|
||||
#message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}")
|
||||
#message("DEBUG: _test_blas = ${_test_blas} former ${_blas}")
|
||||
if (NOT CMAKE_Fortran_COMPILER_LOADED)
|
||||
check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS)
|
||||
else ()
|
||||
check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS)
|
||||
endif ()
|
||||
set(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(_test_blas)
|
||||
set(_libraries_work ${${_prefix}${_combined_name}_WORKS})
|
||||
# message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}")
|
||||
endif()
|
||||
|
||||
if(_libraries_work)
|
||||
set(${LIBRARIES} ${${LIBRARIES}} "${_blas}" ${_threads})
|
||||
else()
|
||||
set(${LIBRARIES} FALSE)
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
|
||||
|
||||
set(LAPACK_LINKER_FLAGS)
|
||||
set(LAPACK_LIBRARIES)
|
||||
set(LAPACK95_LIBRARIES)
|
||||
|
||||
|
||||
if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
|
||||
find_package(BLAS)
|
||||
else()
|
||||
find_package(BLAS REQUIRED)
|
||||
endif()
|
||||
|
||||
|
||||
if(BLAS_FOUND)
|
||||
set(LAPACK_LINKER_FLAGS ${BLAS_LINKER_FLAGS})
|
||||
if (NOT $ENV{BLA_VENDOR} STREQUAL "")
|
||||
set(BLA_VENDOR $ENV{BLA_VENDOR})
|
||||
else ()
|
||||
if(NOT BLA_VENDOR)
|
||||
set(BLA_VENDOR "All")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
#intel lapack
|
||||
if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
|
||||
if (NOT WIN32)
|
||||
set(LAPACK_mkl_LM "-lm")
|
||||
set(LAPACK_mkl_LDL "-ldl")
|
||||
endif ()
|
||||
if (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED)
|
||||
if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
|
||||
find_PACKAGE(Threads)
|
||||
else()
|
||||
find_package(Threads REQUIRED)
|
||||
endif()
|
||||
|
||||
if (BLA_VENDOR MATCHES "_64ilp")
|
||||
set(LAPACK_mkl_ILP_MODE "ilp64")
|
||||
else ()
|
||||
set(LAPACK_mkl_ILP_MODE "lp64")
|
||||
endif ()
|
||||
|
||||
set(LAPACK_SEARCH_LIBS "")
|
||||
|
||||
if (BLA_F95)
|
||||
set(LAPACK_mkl_SEARCH_SYMBOL "cheev_f95")
|
||||
set(_LIBRARIES LAPACK95_LIBRARIES)
|
||||
set(_BLAS_LIBRARIES ${BLAS95_LIBRARIES})
|
||||
|
||||
# old
|
||||
list(APPEND LAPACK_SEARCH_LIBS
|
||||
"mkl_lapack95")
|
||||
# new >= 10.3
|
||||
list(APPEND LAPACK_SEARCH_LIBS
|
||||
"mkl_intel_c")
|
||||
list(APPEND LAPACK_SEARCH_LIBS
|
||||
"mkl_lapack95_${LAPACK_mkl_ILP_MODE}")
|
||||
else()
|
||||
set(LAPACK_mkl_SEARCH_SYMBOL "cheev")
|
||||
set(_LIBRARIES LAPACK_LIBRARIES)
|
||||
set(_BLAS_LIBRARIES ${BLAS_LIBRARIES})
|
||||
|
||||
# old
|
||||
list(APPEND LAPACK_SEARCH_LIBS
|
||||
"mkl_lapack")
|
||||
endif()
|
||||
|
||||
# First try empty lapack libs
|
||||
if (NOT ${_LIBRARIES})
|
||||
check_lapack_libraries(
|
||||
${_LIBRARIES}
|
||||
LAPACK
|
||||
${LAPACK_mkl_SEARCH_SYMBOL}
|
||||
""
|
||||
""
|
||||
"${_BLAS_LIBRARIES}"
|
||||
""
|
||||
)
|
||||
endif ()
|
||||
# Then try the search libs
|
||||
foreach (IT ${LAPACK_SEARCH_LIBS})
|
||||
if (NOT ${_LIBRARIES})
|
||||
check_lapack_libraries(
|
||||
${_LIBRARIES}
|
||||
LAPACK
|
||||
${LAPACK_mkl_SEARCH_SYMBOL}
|
||||
""
|
||||
"${IT}"
|
||||
"${_BLAS_LIBRARIES}"
|
||||
"${CMAKE_THREAD_LIBS_INIT};${LAPACK_mkl_LM};${LAPACK_mkl_LDL}"
|
||||
)
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
unset(LAPACK_mkl_ILP_MODE)
|
||||
unset(LAPACK_mkl_SEARCH_SYMBOL)
|
||||
unset(LAPACK_mkl_LM)
|
||||
unset(LAPACK_mkl_LDL)
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
|
||||
if(NOT LAPACK_LIBRARIES)
|
||||
check_lapack_libraries(
|
||||
LAPACK_LIBRARIES
|
||||
LAPACK
|
||||
cheev
|
||||
""
|
||||
"goto2"
|
||||
"${BLAS_LIBRARIES}"
|
||||
""
|
||||
)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All")
|
||||
if(NOT LAPACK_LIBRARIES)
|
||||
check_lapack_libraries(
|
||||
LAPACK_LIBRARIES
|
||||
LAPACK
|
||||
cheev
|
||||
""
|
||||
"openblas"
|
||||
"${BLAS_LIBRARIES}"
|
||||
""
|
||||
)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (BLA_VENDOR STREQUAL "FLAME" OR BLA_VENDOR STREQUAL "All")
|
||||
if(NOT LAPACK_LIBRARIES)
|
||||
check_lapack_libraries(
|
||||
LAPACK_LIBRARIES
|
||||
LAPACK
|
||||
cheev
|
||||
""
|
||||
"flame"
|
||||
"${BLAS_LIBRARIES}"
|
||||
""
|
||||
)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
#acml lapack
|
||||
if (BLA_VENDOR MATCHES "ACML" OR BLA_VENDOR STREQUAL "All")
|
||||
if (BLAS_LIBRARIES MATCHES ".+acml.+")
|
||||
set (LAPACK_LIBRARIES ${BLAS_LIBRARIES})
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Apple LAPACK library?
|
||||
if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All")
|
||||
if(NOT LAPACK_LIBRARIES)
|
||||
check_lapack_libraries(
|
||||
LAPACK_LIBRARIES
|
||||
LAPACK
|
||||
cheev
|
||||
""
|
||||
"Accelerate"
|
||||
"${BLAS_LIBRARIES}"
|
||||
""
|
||||
)
|
||||
endif()
|
||||
endif ()
|
||||
if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
|
||||
if ( NOT LAPACK_LIBRARIES )
|
||||
check_lapack_libraries(
|
||||
LAPACK_LIBRARIES
|
||||
LAPACK
|
||||
cheev
|
||||
""
|
||||
"vecLib"
|
||||
"${BLAS_LIBRARIES}"
|
||||
""
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
# Generic LAPACK library?
|
||||
if (BLA_VENDOR STREQUAL "Generic" OR
|
||||
BLA_VENDOR STREQUAL "ATLAS" OR
|
||||
BLA_VENDOR STREQUAL "All")
|
||||
if ( NOT LAPACK_LIBRARIES )
|
||||
check_lapack_libraries(
|
||||
LAPACK_LIBRARIES
|
||||
LAPACK
|
||||
cheev
|
||||
""
|
||||
"lapack"
|
||||
"${BLAS_LIBRARIES}"
|
||||
""
|
||||
)
|
||||
endif ()
|
||||
if ( NOT LAPACK_LIBRARIES )
|
||||
check_lapack_libraries(
|
||||
LAPACK_LIBRARIES
|
||||
LAPACK
|
||||
cheev
|
||||
""
|
||||
"lapack;libf2c"
|
||||
"${BLAS_LIBRARIES}"
|
||||
""
|
||||
)
|
||||
endif ()
|
||||
if ( NOT LAPACK_LIBRARIES )
|
||||
check_lapack_libraries(
|
||||
LAPACK_LIBRARIES
|
||||
LAPACK
|
||||
cheev
|
||||
""
|
||||
"lapack;f2c"
|
||||
"${BLAS_LIBRARIES}"
|
||||
""
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
else()
|
||||
message(STATUS "LAPACK requires BLAS")
|
||||
endif()
|
||||
|
||||
if(BLA_F95)
|
||||
if(LAPACK95_LIBRARIES)
|
||||
set(LAPACK95_FOUND TRUE)
|
||||
else()
|
||||
set(LAPACK95_FOUND FALSE)
|
||||
endif()
|
||||
if(NOT LAPACK_FIND_QUIETLY)
|
||||
if(LAPACK95_FOUND)
|
||||
message(STATUS "A library with LAPACK95 API found.")
|
||||
else()
|
||||
if(LAPACK_FIND_REQUIRED)
|
||||
message(FATAL_ERROR
|
||||
"A required library with LAPACK95 API not found. Please specify library location."
|
||||
)
|
||||
else()
|
||||
message(STATUS
|
||||
"A library with LAPACK95 API not found. Please specify library location."
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
set(LAPACK_FOUND "${LAPACK95_FOUND}")
|
||||
set(LAPACK_LIBRARIES "${LAPACK95_LIBRARIES}")
|
||||
else()
|
||||
if(LAPACK_LIBRARIES)
|
||||
set(LAPACK_FOUND TRUE)
|
||||
else()
|
||||
set(LAPACK_FOUND FALSE)
|
||||
endif()
|
||||
|
||||
if(NOT LAPACK_FIND_QUIETLY)
|
||||
if(LAPACK_FOUND)
|
||||
message(STATUS "A library with LAPACK API found.")
|
||||
else()
|
||||
if(LAPACK_FIND_REQUIRED)
|
||||
message(FATAL_ERROR
|
||||
"A required library with LAPACK API not found. Please specify library location."
|
||||
)
|
||||
else()
|
||||
message(STATUS
|
||||
"A library with LAPACK API not found. Please specify library location."
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
cmake_pop_check_state()
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
|
@ -1,112 +0,0 @@
|
||||
diff --git a/INCLUDE/blaswrap.h b/INCLUDE/blaswrap.h
|
||||
index 333a17a..fb6750a 100644
|
||||
--- a/INCLUDE/blaswrap.h
|
||||
+++ b/INCLUDE/blaswrap.h
|
||||
@@ -155,6 +155,107 @@
|
||||
#define ctrsm_ f2c_ctrsm
|
||||
#define ztrsm_ f2c_ztrsm
|
||||
|
||||
+#else
|
||||
+
|
||||
+#define sswap_ sswap
|
||||
+#define saxpy_ saxpy
|
||||
+#define sasum_ sasum
|
||||
+#define isamax_ isamax
|
||||
+#define scopy_ scopy
|
||||
+#define sscal_ sscal
|
||||
+#define sger_ sger
|
||||
+#define snrm2_ snrm2
|
||||
+#define ssymv_ ssymv
|
||||
+#define sdot_ sdot
|
||||
+#define saxpy_ saxpy
|
||||
+#define ssyr2_ ssyr2
|
||||
+#define srot_ srot
|
||||
+#define sgemv_ sgemv
|
||||
+#define strsv_ strsv
|
||||
+#define sgemm_ sgemm
|
||||
+#define strsm_ strsm
|
||||
+
|
||||
+#define dswap_ dswap
|
||||
+#define daxpy_ daxpy
|
||||
+#define dasum_ dasum
|
||||
+#define idamax_ idamax
|
||||
+#define dcopy_ dcopy
|
||||
+#define dscal_ dscal
|
||||
+#define dger_ dger
|
||||
+#define dnrm2_ dnrm2
|
||||
+#define dsymv_ dsymv
|
||||
+#define ddot_ ddot
|
||||
+#define dsyr2_ dsyr2
|
||||
+#define drot_ drot
|
||||
+#define dgemv_ dgemv
|
||||
+#define dtrsv_ dtrsv
|
||||
+#define dgemm_ dgemm
|
||||
+#define dtrsm_ dtrsm
|
||||
+
|
||||
+#define cswap_ cswap
|
||||
+#define caxpy_ caxpy
|
||||
+#define scasum_ scasum
|
||||
+#define icamax_ icamax
|
||||
+#define ccopy_ ccopy
|
||||
+#define cscal_ cscal
|
||||
+#define scnrm2_ scnrm2
|
||||
+#define cgemv_ cgemv
|
||||
+#define ctrsv_ ctrsv
|
||||
+#define cgemm_ cgemm
|
||||
+#define ctrsm_ ctrsm
|
||||
+#define cgerc_ cgerc
|
||||
+#define chemv_ chemv
|
||||
+#define cher2_ cher2
|
||||
+
|
||||
+#define zswap_ zswap
|
||||
+#define zaxpy_ zaxpy
|
||||
+#define dzasum_ dzasum
|
||||
+#define izamax_ izamax
|
||||
+#define zcopy_ zcopy
|
||||
+#define zscal_ zscal
|
||||
+#define dznrm2_ dznrm2
|
||||
+#define zgemv_ zgemv
|
||||
+#define ztrsv_ ztrsv
|
||||
+#define zgemm_ zgemm
|
||||
+#define ztrsm_ ztrsm
|
||||
+#define zgerc_ zgerc
|
||||
+#define zhemv_ zhemv
|
||||
+#define zher2_ zher2
|
||||
+
|
||||
+/* LAPACK */
|
||||
+#define dlacon_ dlacon
|
||||
+#define slacon_ slacon
|
||||
+#define icmax1_ icmax1
|
||||
+#define scsum1_ scsum1
|
||||
+#define clacon_ clacon
|
||||
+#define dzsum1_ dzsum1
|
||||
+#define izmax1_ izmax1
|
||||
+#define zlacon_ zlacon
|
||||
+
|
||||
+/* Fortran interface */
|
||||
+#define c_bridge_dgssv_ c_bridge_dgssv
|
||||
+#define c_fortran_sgssv_ c_fortran_sgssv
|
||||
+#define c_fortran_dgssv_ c_fortran_dgssv
|
||||
+#define c_fortran_cgssv_ c_fortran_cgssv
|
||||
+#define c_fortran_zgssv_ c_fortran_zgssv
|
||||
+
|
||||
+#define cdotc_ cdotc
|
||||
+#define cdotu_ cdotu
|
||||
+#define csscal_ csscal
|
||||
+#define zdscal_ zdscal
|
||||
+#define zdotc_ zdotc
|
||||
+#define zdotu_ zdotu
|
||||
+#define ctrmm_ ctrmm
|
||||
+#define dtrmm_ dtrmm
|
||||
+#define strmm_ strmm
|
||||
+#define ztrmm_ ztrmm
|
||||
+#define cgeru_ cgeru
|
||||
+#define zgeru_ zgeru
|
||||
+#define xerbla_ xerbla
|
||||
+#define dtrmv_ dtrmv
|
||||
+#define dsyrk_ dsyrk
|
||||
+#define zherk_ zherk
|
||||
+
|
||||
#endif /* NO_BLAS_WRAP */
|
||||
|
||||
#endif /* __BLASWRAP_H */
|
@ -1,11 +1,5 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
message(WARNING "You do not need this package on macOS, since you already have the Accelerate Framework")
|
||||
return()
|
||||
endif()
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
@ -14,16 +8,11 @@ vcpkg_download_distfile(ARCHIVE
|
||||
SHA512 cf19c710291ddff3f6ead7d86bdfdeaebca21291d9df094bf0a8ef599546b007757fb2dbb19b56511bb53ef7456eac0c73973b9627bf4d02982c856124428b49
|
||||
)
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(ADDITIONAL_PATCH "enable_openblas_compat.patch")
|
||||
endif()
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
PATCHES
|
||||
remove_internal_blas.patch
|
||||
${ADDITIONAL_PATCH}
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
@ -37,7 +26,7 @@ vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
#TODO: fix the official exported targets, since they are broken (luckily it seems that no-one uses them for now)
|
||||
vcpkg_fixup_cmake_targets()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/clapack)
|
||||
|
||||
#we install a cmake wrapper since the official FindLAPACK module in cmake does find clapack easily, unfortunately...
|
||||
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/lapack)
|
||||
|
@ -1,8 +1,2 @@
|
||||
set(LAPACK_PREV_MODULE_PATH ${CMAKE_MODULE_PATH})
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindLAPACK.cmake)
|
||||
|
||||
if(NOT LAPACK_LIBRARIES)
|
||||
_find_package(${ARGS})
|
||||
endif()
|
||||
|
||||
set(CMAKE_MODULE_PATH ${LAPACK_PREV_MODULE_PATH})
|
||||
|
3
ports/cpp-peglib/CONTROL
Normal file
3
ports/cpp-peglib/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: cpp-peglib
|
||||
Version: 0.1.0
|
||||
Description: C++11 header-only PEG (Parsing Expression Grammars) library.
|
17
ports/cpp-peglib/portfile.cmake
Normal file
17
ports/cpp-peglib/portfile.cmake
Normal file
@ -0,0 +1,17 @@
|
||||
#header-only library
|
||||
include(vcpkg_common_functions)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO yhirose/cpp-peglib
|
||||
REF v0.1.0
|
||||
SHA512 7efe9da8fe75d766a50d6508c81369b71981aa1e36c0d9981d57b75822fde81074b8803753bfa599ab4ce2a7047be731c22476d0938728ebb9a9dbf63aaeb9e6
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY ${SOURCE_PATH}/peglib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpp-peglib)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/cpp-peglib/LICENSE ${CURRENT_PACKAGES_DIR}/share/cpp-peglib/copyright)
|
@ -1,5 +1,5 @@
|
||||
Source: cpprestsdk
|
||||
Version: 2.10.13-1
|
||||
Version: 2.10.14
|
||||
Build-Depends: zlib, openssl (!uwp&!windows), boost-system (!uwp&!windows), boost-date-time (!uwp&!windows), boost-regex (!uwp&!windows), boost-thread (!uwp&!windows), boost-filesystem (!uwp&!windows), boost-random (!uwp&!windows), boost-chrono (!uwp&!windows), boost-asio (!uwp&!windows)
|
||||
Homepage: https://github.com/Microsoft/cpprestsdk
|
||||
Description: C++11 JSON, REST, and OAuth library
|
||||
|
@ -3,8 +3,8 @@ include(vcpkg_common_functions)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO Microsoft/cpprestsdk
|
||||
REF v2.10.13
|
||||
SHA512 43e60ee1266e0009f04452736a1b5127439d54416060f81544613007a8bcc084705bedd482ec3519140e79a6f56bddba6d25e9752228595bb8f83ce560ae39b8
|
||||
REF v2.10.14
|
||||
SHA512 7208b8c31e42a9bda2bf1d5c65527e54e3f946ec57743aaf7058c12a311de78de354d5ff859f35b3a8936c8964ac5695a692e234f3365edc426cf9580f76cd4f
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
Source: curl
|
||||
Version: 7.65.0-3
|
||||
Version: 7.65.2-1
|
||||
Build-Depends: zlib
|
||||
Homepage: https://github.com/curl/curl
|
||||
Description: A library for transferring data with URLs
|
||||
|
@ -3,8 +3,8 @@ include(vcpkg_common_functions)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO curl/curl
|
||||
REF curl-7_65_0
|
||||
SHA512 436b6b42654c1db2b3f69df410a7f28401a50faf18e74f328a93585c147541e697664b0e9e7df03239fd76c797c1bb4f435f4c668a6b0ad28bdd67e17f786491
|
||||
REF curl-7_65_2
|
||||
SHA512 8e06377a6d8837a4c2cd96f978f0ac848b9472500fd25983bb1f9e5f52d9d6f7ff0c71d443587a979cf80fd19412bb64b9362b774cf91e02479fdfad7e085b16
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0001_cmake.patch
|
||||
|
4
ports/dbg-macro/CONTROL
Normal file
4
ports/dbg-macro/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: dbg-macro
|
||||
Version: 2019-07-11
|
||||
Description: A dbg(...) macro for C++
|
||||
Homepage: https://github.com/sharkdp/dbg-macro
|
16
ports/dbg-macro/portfile.cmake
Normal file
16
ports/dbg-macro/portfile.cmake
Normal file
@ -0,0 +1,16 @@
|
||||
# single header file library
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO sharkdp/dbg-macro
|
||||
REF 4409d8428baf700873bcfee42e63bbca6700b97e
|
||||
SHA512 f9f936707631bee112566a24c92cbf171e54362099df689253ab38d0489400f65c284df81749376f18cb3ebcefea3cc18844554016798c2542ec73dc2afcc931
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY ${SOURCE_PATH}/dbg.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
|
||||
# Handle copyright
|
||||
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
@ -1,4 +1,4 @@
|
||||
Source: directxtk
|
||||
Version: apr2019
|
||||
Version: apr2019-1
|
||||
Homepage: https://github.com/Microsoft/DirectXTK
|
||||
Description: A collection of helper classes for writing DirectX 11.x code in C++.
|
||||
|
39
ports/directxtk/fix-invalid-configuration.patch
Normal file
39
ports/directxtk/fix-invalid-configuration.patch
Normal file
@ -0,0 +1,39 @@
|
||||
diff --git a/DirectXTK_Windows10.sln b/DirectXTK_Windows10.sln
|
||||
index 8962307..9e3b8a7 100644
|
||||
--- a/DirectXTK_Windows10.sln
|
||||
+++ b/DirectXTK_Windows10.sln
|
||||
@@ -15,11 +15,11 @@ Global
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|ARM64 = Debug|ARM64
|
||||
Debug|x64 = Debug|x64
|
||||
- Debug|x86 = Debug|x86
|
||||
+ Debug|Win32 = Debug|Win32
|
||||
Release|ARM = Release|ARM
|
||||
Release|ARM64 = Release|ARM64
|
||||
Release|x64 = Release|x64
|
||||
- Release|x86 = Release|x86
|
||||
+ Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
@@ -28,16 +28,16 @@ Global
|
||||
{F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|x64.Build.0 = Debug|x64
|
||||
- {F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
- {F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|x86.Build.0 = Debug|Win32
|
||||
+ {F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
+ {F4776924-619C-42C7-88B2-82C947CCC9E7}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|ARM.Build.0 = Release|ARM
|
||||
{F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|x64.ActiveCfg = Release|x64
|
||||
{F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|x64.Build.0 = Release|x64
|
||||
- {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|x86.ActiveCfg = Release|Win32
|
||||
- {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|x86.Build.0 = Release|Win32
|
||||
+ {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|Win32.ActiveCfg = Release|Win32
|
||||
+ {F4776924-619C-42C7-88B2-82C947CCC9E7}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
@ -12,6 +12,7 @@ vcpkg_from_github(
|
||||
REF apr2019
|
||||
SHA512 811ed222c1650d34a8475e44719cca8972a85d96f9ccb10548e1501eb9d28fd8685de90832b517cdcbf21ae8c9160dea69000e8dca06fab745a15a7acc14ba98
|
||||
HEAD_REF master
|
||||
PATCHES fix-invalid-configuration.patch
|
||||
)
|
||||
|
||||
IF (TRIPLET_SYSTEM_ARCH MATCHES "x86")
|
||||
@ -20,33 +21,41 @@ ELSE()
|
||||
SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH})
|
||||
ENDIF()
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
set(SLN_NAME "Windows10")
|
||||
else()
|
||||
set(SLN_NAME "Desktop_2017")
|
||||
endif()
|
||||
|
||||
vcpkg_build_msbuild(
|
||||
PROJECT_PATH ${SOURCE_PATH}/DirectXTK_Desktop_2017.sln
|
||||
PROJECT_PATH ${SOURCE_PATH}/DirectXTK_${SLN_NAME}.sln
|
||||
PLATFORM ${BUILD_ARCH}
|
||||
)
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/Bin/Desktop_2017/${BUILD_ARCH}/Release/DirectXTK.lib
|
||||
${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/DirectXTK.lib
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/Bin/Desktop_2017/${BUILD_ARCH}/Debug/DirectXTK.lib
|
||||
${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Debug/DirectXTK.lib
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
|
||||
set(DXTK_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/directxtk)
|
||||
file(MAKE_DIRECTORY ${DXTK_TOOL_PATH})
|
||||
if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
set(DXTK_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/directxtk)
|
||||
file(MAKE_DIRECTORY ${DXTK_TOOL_PATH})
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/MakeSpriteFont/bin/Release/MakeSpriteFont.exe
|
||||
DESTINATION ${DXTK_TOOL_PATH})
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/XWBTool/Bin/Desktop_2017/${BUILD_ARCH}/Release/XWBTool.exe
|
||||
DESTINATION ${DXTK_TOOL_PATH})
|
||||
endif()
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/MakeSpriteFont/bin/Release/MakeSpriteFont.exe
|
||||
DESTINATION ${DXTK_TOOL_PATH})
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/XWBTool/Bin/Desktop_2017/${BUILD_ARCH}/Release/XWBTool.exe
|
||||
DESTINATION ${DXTK_TOOL_PATH})
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/Inc/
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include/DirectXTK
|
||||
${SOURCE_PATH}/Inc/
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include/DirectXTK
|
||||
)
|
||||
|
||||
# Handle copyright
|
||||
|
@ -1,5 +1,5 @@
|
||||
Source: eastl
|
||||
Version: 3.13.05-1
|
||||
Version: 3.14.00
|
||||
Homepage: https://github.com/electronicarts/EASTL
|
||||
Description: Electronic Arts Standard Template Library.
|
||||
It is a C++ template library of containers, algorithms, and iterators useful for runtime and tool development across multiple platforms. It is a fairly extensive and robust implementation of such a library and has an emphasis on high performance above all other considerations.
|
||||
|
19
ports/eastl/fix_cmake_install.patch
Normal file
19
ports/eastl/fix_cmake_install.patch
Normal file
@ -0,0 +1,19 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b8171cd..c771e77 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -41,6 +41,7 @@ add_definitions(-DEASTL_OPENSOURCE=1)
|
||||
#-------------------------------------------------------------------------------------------
|
||||
# Include dirs
|
||||
#-------------------------------------------------------------------------------------------
|
||||
+include_directories(APPEND test/packages)
|
||||
target_include_directories(EASTL PUBLIC include)
|
||||
|
||||
#-------------------------------------------------------------------------------------------
|
||||
@@ -48,3 +49,6 @@ target_include_directories(EASTL PUBLIC include)
|
||||
#-------------------------------------------------------------------------------------------
|
||||
target_link_libraries(EASTL EABase)
|
||||
|
||||
+install(TARGETS EASTL DESTINATION lib)
|
||||
+install(DIRECTORY include/EASTL DESTINATION include)
|
||||
+install(DIRECTORY test/packages/EABase DESTINATION include)
|
13
ports/eastl/fix_uwp.patch
Normal file
13
ports/eastl/fix_uwp.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/include/Common/EABase/config/eaplatform.h b/include/Common/EABase/config/eaplatform.h
|
||||
index 8b16146..54079ab 100644
|
||||
--- a/include/Common/EABase/config/eaplatform.h
|
||||
+++ b/include/Common/EABase/config/eaplatform.h
|
||||
@@ -125,7 +125,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
-#elif defined(EA_PLATFORM_XBOXONE) || defined(_DURANGO) || defined(EA_PLATFORM_CAPILANO) || (defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_GAMES || WINAPI_FAMILY == WINAPI_FAMILY_TV_TITLE))
|
||||
+#elif defined(EA_PLATFORM_XBOXONE) || defined(_DURANGO) || defined(EA_PLATFORM_CAPILANO) || (defined(WINAPI_FAMILY) && WINAPI_FAMILY && (WINAPI_FAMILY == WINAPI_FAMILY_GAMES || WINAPI_FAMILY == WINAPI_FAMILY_TV_TITLE))
|
||||
// XBox One
|
||||
// Durango was Microsoft's code-name for the platform, which is now obsolete.
|
||||
// Microsoft uses _DURANGO instead of some variation of _XBOX, though it's not natively defined by the compiler.
|
@ -2,19 +2,37 @@ include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/eastl)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO electronicarts/EABase
|
||||
REF 6f27a2f7aa21f2d71ae8c6bc1d889d0119677a56
|
||||
SHA512 9176fb2d508cf023c3c16c61a511196a2f6af36172145544bba44062a00ca7591e54e4fc16ac13562ef0e2d629b626f398bff3669b4cdb7ba0068548d6a53883
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix_uwp.patch
|
||||
)
|
||||
|
||||
set(EABASE_PATH ${SOURCE_PATH})
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO electronicarts/EASTL
|
||||
REF 3.13.05
|
||||
SHA512 2364554339203c972f10d58ebe8f14fb221a40451f4cd2c3c5acd6891e8580c1a0a5d4ba592c91349d3feca50d9880648bb37358820a1c9552dde3f7af400a82
|
||||
REF dcd2b838d52de13691999aff8faeaa8f284928ac
|
||||
SHA512 9756ee47a30447f17ceb45fb5143d6e80905636cf709c171059a83f74094fb25391c896de0ea5e063cdad4e7334c5f963c75b1c34ad539fd24175983a2054159
|
||||
HEAD_REF master
|
||||
PATCHES fixchar8_t.patch # can be removed after electronicarts/EASTL#274 is resolved
|
||||
PATCHES
|
||||
fixchar8_t.patch # can be removed after electronicarts/EASTL#274 is resolved
|
||||
fix_cmake_install.patch
|
||||
)
|
||||
|
||||
file(COPY ${EABASE_PATH}/include/Common/EABase/ DESTINATION ${SOURCE_PATH}/test/packages/EABase)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DEASTL_BUILD_TESTS=OFF
|
||||
-DEASTL_BUILD_BENCHMARK=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: ecsutil
|
||||
Version: 1.0.6.1
|
||||
Version: 1.0.6.1-1
|
||||
Description: Native Windows SDK for accessing ECS via the S3 HTTP protocol.
|
||||
Build-Depends: atlmfc
|
||||
Build-Depends: atlmfc (windows)
|
||||
|
@ -1,5 +1,5 @@
|
||||
Source: geogram
|
||||
Version: 1.6.9-6
|
||||
Version: 1.6.9-7
|
||||
Homepage: https://gforge.inria.fr/projects/geogram/
|
||||
Description: Geogram is a programming library of geometric algorithms.
|
||||
Build-Depends: openblas (!osx), clapack (!osx)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,10 +0,0 @@
|
||||
diff --git a/src/lib/third_party/numerics/SUPERLU/slu_Cnames.h b/src/lib/third_party/numerics/SUPERLU/slu_Cnames.h
|
||||
index 68b3afe..0369a68 100755
|
||||
--- a/src/lib/third_party/numerics/SUPERLU/slu_Cnames.h
|
||||
+++ b/src/lib/third_party/numerics/SUPERLU/slu_Cnames.h
|
||||
@@ -1,4 +1,4 @@
|
||||
-#define Add_ /* Bruno */
|
||||
+#define NoChange
|
||||
|
||||
/*! \file
|
||||
Copyright (c) 2003, The Regents of the University of California, through
|
@ -8,17 +8,12 @@ vcpkg_download_distfile(ARCHIVE
|
||||
SHA512 1b5c7540bef734c1908f213f26780aba63b4911a8022d5eb3f7c90eabe2cb69efd1f298b30cdc8e2c636a5b37c8c25832dd4aad0b7c2ff5f0a5b5caa17970136
|
||||
)
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(ADDITIONAL_PATCHES "fix_underscore.patch" "enable_openblas_compatibility.patch")
|
||||
endif()
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
REF ${GEOGRAM_VERSION}
|
||||
PATCHES
|
||||
fix-cmake-config-and-install.patch
|
||||
${ADDITIONAL_PATCHES}
|
||||
)
|
||||
|
||||
file(COPY ${CURRENT_PORT_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH}/cmake)
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: google-cloud-cpp
|
||||
Version: 0.10.0
|
||||
Version: 0.11.0
|
||||
Build-Depends: grpc, curl[ssl], crc32c
|
||||
Description: C++ Client Libraries for Google Cloud Platform APIs.
|
||||
|
@ -5,8 +5,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO googleapis/google-cloud-cpp
|
||||
REF v0.10.0
|
||||
SHA512 9a1774dcc39d1626c8a9cf8630fe3b3110df7e21e452c7b137e1911d10b304997571aadff5fc0216715729db4a29621066a5236a0b2cb027bba4ce3c56492fb3
|
||||
REF v0.11.0
|
||||
SHA512 059322c73a9632644faec7dc33fc9e390cd5aeb1576a2e6ddeeb6e4078040c47f71fe687702f04173ee86638886872046ea22e60fae3f6a8bf16f6bfb9478962
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
Source: irrlicht
|
||||
Version: 1.8.4
|
||||
Version: 1.8.4-1
|
||||
Description: Irrlicht lightning fast 3d engine
|
||||
Build-Depends: zlib, libpng, bzip2, libjpeg-turbo
|
||||
|
||||
|
@ -90,5 +90,8 @@ freely, subject to the following restrictions:
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/irrlicht)
|
||||
endif()
|
||||
# Post-build test for cmake libraries
|
||||
vcpkg_test_cmake(PACKAGE_NAME irrlicht)
|
||||
|
11
ports/irrlicht/vcpkg-cmake-wrapper.cmake
Normal file
11
ports/irrlicht/vcpkg-cmake-wrapper.cmake
Normal file
@ -0,0 +1,11 @@
|
||||
_find_package(${ARGS})
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(PNG REQUIRED)
|
||||
find_package(JPEG REQUIRED)
|
||||
find_package(BZip2 REQUIRED)
|
||||
if(TARGET Irrlicht::Irrlicht)
|
||||
set_property(TARGET Irrlicht::Irrlicht APPEND PROPERTY INTERFACE_LINK_LIBRARIES ZLIB::ZLIB PNG::PNG JPEG::JPEG BZip2::BZip2)
|
||||
endif()
|
||||
if(IRRLICHT_LIBRARIES)
|
||||
list(APPEND IRRLICHT_LIBRARIES ${ZLIB_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${BZIP2_LIBRARIES})
|
||||
endif()
|
@ -21,4 +21,7 @@ vcpkg_install_cmake()
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/json-spirit RENAME copyright)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
vcpkg_copy_pdbs()
|
||||
|
4
ports/lastools/CONTROL
Normal file
4
ports/lastools/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: lastools
|
||||
Version: 2019-07-10
|
||||
Homepage: https://github.com/LAStools/LAStools
|
||||
Description: LAStools: award-winning software for efficient LiDAR processing (with LASzip)
|
35
ports/lastools/portfile.cmake
Normal file
35
ports/lastools/portfile.cmake
Normal file
@ -0,0 +1,35 @@
|
||||
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
message(FATAL_ERROR "${PORT} doesn't currently support UWP.")
|
||||
endif()
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO LAStools/LAStools
|
||||
REF f15a702530e098b46c2eb3923f89a68ffa81e668
|
||||
SHA512 df5763b7c69721ba2a24fde2b4092e53136020b88ff4cc0d533279d709c55d7d16d8a4300f0b68829294d9311ed674af5b15306c4ded7a6310e55404737702e0
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake)
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)
|
||||
|
3
ports/leaf/CONTROL
Normal file
3
ports/leaf/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: leaf
|
||||
Version: 0.2.1-1
|
||||
Description: Lightweight error augmentation framework
|
20
ports/leaf/portfile.cmake
Normal file
20
ports/leaf/portfile.cmake
Normal file
@ -0,0 +1,20 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO zajo/leaf
|
||||
REF 5fd08ee095c92b2bf4623b7237393e81f995ca7a
|
||||
SHA512 92b86dbba55d31808f442d27dd873dce1162b28213533e124df448ae4f7b4442733501b6539ab15f67a85e184e458a66df4e4e020a3a213b44578ebbde281a42
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/leaf RENAME copyright)
|
@ -1,4 +1,4 @@
|
||||
Source: leveldb
|
||||
Version: 1.22
|
||||
Version: 1.22-1
|
||||
Homepage: https://github.com/bitcoin-core/leveldb
|
||||
Description: LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.
|
||||
|
@ -1,19 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 1409c06..c81d219 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -440,12 +440,12 @@ if(LEVELDB_INSTALL)
|
||||
install(
|
||||
EXPORT leveldbTargets
|
||||
NAMESPACE leveldb::
|
||||
- DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/leveldb"
|
||||
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/../share/leveldb"
|
||||
)
|
||||
install(
|
||||
FILES
|
||||
"${PROJECT_SOURCE_DIR}/cmake/leveldbConfig.cmake"
|
||||
"${PROJECT_BINARY_DIR}/leveldbConfigVersion.cmake"
|
||||
- DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/leveldb"
|
||||
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/../share/leveldb"
|
||||
)
|
||||
endif(LEVELDB_INSTALL)
|
26
ports/leveldb/fix_config.patch
Normal file
26
ports/leveldb/fix_config.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 1409c06..98b87dc 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -437,6 +437,12 @@ if(LEVELDB_INSTALL)
|
||||
"${PROJECT_BINARY_DIR}/leveldbConfigVersion.cmake"
|
||||
COMPATIBILITY SameMajorVersion
|
||||
)
|
||||
+ configure_package_config_file(${PROJECT_SOURCE_DIR}/cmake/leveldbConfig.cmake.in
|
||||
+ leveldbConfig.cmake
|
||||
+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/leveldb
|
||||
+ NO_CHECK_REQUIRED_COMPONENTS_MACRO
|
||||
+ PATH_VARS CMAKE_INSTALL_INCLUDEDIR
|
||||
+ )
|
||||
install(
|
||||
EXPORT leveldbTargets
|
||||
NAMESPACE leveldb::
|
||||
@@ -444,7 +450,7 @@ if(LEVELDB_INSTALL)
|
||||
)
|
||||
install(
|
||||
FILES
|
||||
- "${PROJECT_SOURCE_DIR}/cmake/leveldbConfig.cmake"
|
||||
+ "${PROJECT_BINARY_DIR}/leveldbConfig.cmake"
|
||||
"${PROJECT_BINARY_DIR}/leveldbConfigVersion.cmake"
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/leveldb"
|
||||
)
|
6
ports/leveldb/leveldbConfig.cmake.in
Normal file
6
ports/leveldb/leveldbConfig.cmake.in
Normal file
@ -0,0 +1,6 @@
|
||||
@PACKAGE_INIT@
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
set_and_check(leveldb_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/leveldbTargets.cmake")
|
@ -1,5 +1,9 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
message(FATAL_ERROR "leveldb doesn't supports UWP")
|
||||
endif()
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
@ -9,9 +13,11 @@ vcpkg_from_github(
|
||||
SHA512 f9bbf5f466e7f707b94e19261762319ea9f65d41911690e84f59098551e2e69beccf756a414d705ade74ee96fd979bdb8b94c171c6f2cc83873cbd4a9380dbab
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-install_path.patch
|
||||
fix_config.patch
|
||||
)
|
||||
|
||||
file(COPY ${CURRENT_PORT_DIR}/leveldbConfig.cmake.in DESTINATION ${SOURCE_PATH}/cmake)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
||||
@ -20,6 +26,8 @@ vcpkg_configure_cmake(
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/leveldb)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
|
@ -2,4 +2,4 @@ Source: libkml
|
||||
Version: 1.3.0-3
|
||||
Homepage: https://github.com/libkml/libkml
|
||||
Description: Reference implementation of OGC KML 2.2
|
||||
Build-Depends: zlib, expat, minizip, uriparser, boost-smart-ptr
|
||||
Build-Depends: zlib, expat, minizip[bzip2], uriparser, boost-smart-ptr
|
||||
|
@ -34,4 +34,4 @@ install(TARGETS raqm
|
||||
set(RAQM_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||
set(RAQM_LIBRARY raqm)
|
||||
set(RAQM_LIBRARIES ${HARFBUZZ_LIBRARY} ${FRIBIDI_LIBRARY} ${RAQM_LIBRARY})
|
||||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.h ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm-version.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
|
@ -152,24 +152,24 @@ else ()
|
||||
-Wbad-function-cast
|
||||
-Wcast-qual
|
||||
#-Wdiv-by-zero
|
||||
-Wduplicated-branches
|
||||
-Wduplicated-cond
|
||||
#-Wduplicated-branches
|
||||
#-Wduplicated-cond
|
||||
-Wfloat-equal
|
||||
-Wformat=2
|
||||
-Wlogical-op
|
||||
-Wmaybe-uninitialized
|
||||
-Wmisleading-indentation
|
||||
#-Wmisleading-indentation
|
||||
-Wmissing-declarations
|
||||
-Wmissing-prototypes
|
||||
-Wnested-externs
|
||||
#-Wno-type-limits
|
||||
#-Wno-unknown-pragmas
|
||||
-Wnormalized=id
|
||||
-Wnull-dereference
|
||||
#-Wnull-dereference
|
||||
-Wold-style-declaration
|
||||
-Wpointer-arith
|
||||
-Wredundant-decls
|
||||
-Wrestrict
|
||||
#-Wrestrict
|
||||
#-Wsometimes-uninitialized
|
||||
-Wstrict-prototypes
|
||||
-Wswitch-enum
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: libsodium
|
||||
Version: 1.0.18
|
||||
Version: 1.0.18-1
|
||||
Description: A modern and easy-to-use crypto library
|
||||
Homepage: https://github.com/jedisct1/libsodium
|
||||
|
@ -1,3 +1,3 @@
|
||||
Source: libyaml
|
||||
Version: 0.2.2
|
||||
Version: 0.2.2-1
|
||||
Description: A C library for parsing and emitting YAML.
|
||||
|
13
ports/libyaml/fix-POSIX_name.patch
Normal file
13
ports/libyaml/fix-POSIX_name.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/src/api.c b/src/api.c
|
||||
index e793b08..6f16fc5 100644
|
||||
--- a/src/api.c
|
||||
+++ b/src/api.c
|
||||
@@ -63,7 +63,7 @@ yaml_strdup(const yaml_char_t *str)
|
||||
if (!str)
|
||||
return NULL;
|
||||
|
||||
- return (yaml_char_t *)strdup((char *)str);
|
||||
+ return (yaml_char_t *)_strdup((char *)str);
|
||||
}
|
||||
|
||||
/*
|
@ -6,6 +6,8 @@ vcpkg_from_github(
|
||||
REF 0.2.2
|
||||
SHA512 455494591014a97c4371a1f372ad09f0d6e487e4f1d3419c98e9cd2f16d43a0cf9a0787d7250bebee8b8d400df4626f5acd81e90139e54fa574a66ec84964c06
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-POSIX_name.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: metis
|
||||
Version: 5.1.0-3
|
||||
Version: 5.1.0-4
|
||||
Homepage: https://glaros.dtc.umn.edu/gkhome/metis/metis/overview
|
||||
Description: Serial Graph Partitioning and Fill-reducing Matrix Ordering
|
||||
|
14
ports/metis/fix-linux-build-error.patch
Normal file
14
ports/metis/fix-linux-build-error.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e94f050..b9613a7 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,7 +1,8 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
project(METIS)
|
||||
|
||||
-set(GKLIB_PATH "GKlib" CACHE PATH "path to GKlib")
|
||||
+set(GKLIB_PATH "${CMAKE_SOURCE_DIR}/GKlib" CACHE PATH "path to GKlib")
|
||||
+
|
||||
set(SHARED FALSE CACHE BOOL "build a shared library")
|
||||
|
||||
set(METIS_INSTALL TRUE)
|
@ -21,6 +21,7 @@ vcpkg_extract_source_archive_ex(
|
||||
fix-runtime-install-destination.patch
|
||||
fix-metis-vs14-math.patch
|
||||
fix-gklib-vs14-math.patch
|
||||
fix-linux-build-error.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
|
@ -6,12 +6,20 @@ if(MSVC)
|
||||
endif()
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
find_package(BZip2 REQUIRED)
|
||||
|
||||
set(MIN_SRC contrib/minizip)
|
||||
|
||||
include_directories(${MIN_SRC} ${ZLIB_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR})
|
||||
include_directories(${MIN_SRC} ${ZLIB_INCLUDE_DIRS})
|
||||
|
||||
set(MINIZIP_LIBRARIES ZLIB::ZLIB)
|
||||
if(ENABLE_BZIP2)
|
||||
message(STATUS "Building with bzip2 support")
|
||||
find_package(BZip2)
|
||||
|
||||
include_directories(${BZIP2_INCLUDE_DIR})
|
||||
set(MINIZIP_LIBRARIES ${MINIZIP_LIBRARIES} ${BZIP2_LIBRARIES})
|
||||
else()
|
||||
message(STATUS "Building without bzip2 support")
|
||||
endif()
|
||||
|
||||
set(SRC
|
||||
${MIN_SRC}/ioapi.c
|
||||
@ -41,14 +49,16 @@ add_library(minizip ${SRC})
|
||||
target_link_libraries(minizip PRIVATE ZLIB::ZLIB)
|
||||
target_compile_definitions(minizip PRIVATE -D_ZLIB_H)
|
||||
|
||||
target_link_libraries(minizip PRIVATE ${BZIP2_LIBRARIES})
|
||||
target_compile_definitions(minizip PRIVATE -DHAVE_BZIP2=1)
|
||||
if(ENABLE_BZIP2)
|
||||
target_link_libraries(minizip PRIVATE ${BZIP2_LIBRARIES})
|
||||
target_compile_definitions(minizip PRIVATE -DHAVE_BZIP2=1)
|
||||
endif()
|
||||
|
||||
add_executable(minizip_bin ${MIN_SRC}/minizip.c)
|
||||
add_executable(miniunz_bin ${MIN_SRC}/miniunz.c)
|
||||
add_executable(minizip_bin ${MIN_SRC}/minizip.c)
|
||||
add_executable(miniunz_bin ${MIN_SRC}/miniunz.c)
|
||||
|
||||
target_link_libraries(minizip_bin minizip ${BZIP2_LIBRARIES} ZLIB::ZLIB)
|
||||
target_link_libraries(miniunz_bin minizip ${BZIP2_LIBRARIES} ZLIB::ZLIB)
|
||||
target_link_libraries(minizip_bin minizip ${MINIZIP_LIBRARIES})
|
||||
target_link_libraries(miniunz_bin minizip ${MINIZIP_LIBRARIES})
|
||||
|
||||
set_target_properties(minizip_bin PROPERTIES OUTPUT_NAME minizip)
|
||||
set_target_properties(miniunz_bin PROPERTIES OUTPUT_NAME miniunz)
|
||||
|
@ -1,5 +1,9 @@
|
||||
Source: minizip
|
||||
Version: 1.2.11-4
|
||||
Version: 1.2.11-5
|
||||
Build-Depends: zlib
|
||||
Homepage: https://github.com/madler/zlib
|
||||
Description: Zip compression library
|
||||
Build-Depends: bzip2, zlib
|
||||
|
||||
Feature: bzip2
|
||||
Build-Depends: bzip2
|
||||
Description: Support compression using bzip2 library
|
||||
|
@ -1,37 +1,48 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
|
||||
message(FATAL_ERROR "WindowsStore not supported")
|
||||
message(FATAL_ERROR "WindowsStore not supported")
|
||||
endif()
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO madler/zlib
|
||||
REF v1.2.11
|
||||
SHA512 104c62ed1228b5f1199bc037081861576900eb0697a226cafa62a35c4c890b5cb46622e399f9aad82ee5dfb475bae26ae75e2bd6da3d261361b1c8b996970faf
|
||||
HEAD_REF master
|
||||
PATCHES minizip.patch # enable decrypt support for password-encrypted ZIP files
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO madler/zlib
|
||||
REF v1.2.11
|
||||
SHA512 104c62ed1228b5f1199bc037081861576900eb0697a226cafa62a35c4c890b5cb46622e399f9aad82ee5dfb475bae26ae75e2bd6da3d261361b1c8b996970faf
|
||||
HEAD_REF master
|
||||
PATCHES minizip.patch # enable decrypt support for password-encrypted ZIP files
|
||||
)
|
||||
|
||||
set(BUILD_minizip_bzip2 OFF)
|
||||
if ("bzip2" IN_LIST FEATURES)
|
||||
set(BUILD_minizip_bzip2 ON)
|
||||
endif()
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DENABLE_BZIP2=${BUILD_minizip_bzip2}
|
||||
OPTIONS_DEBUG
|
||||
-DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/minizip)
|
||||
file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/minizip/*.h")
|
||||
foreach(HEADER ${HEADERS})
|
||||
file(READ "${HEADER}" _contents)
|
||||
string(REPLACE "#ifdef HAVE_BZIP2" "#if 1" _contents "${_contents}")
|
||||
file(WRITE "${HEADER}" "${_contents}")
|
||||
endforeach()
|
||||
|
||||
if ("bzip2" IN_LIST FEATURES)
|
||||
file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/minizip/*.h")
|
||||
foreach(HEADER ${HEADERS})
|
||||
file(READ "${HEADER}" _contents)
|
||||
string(REPLACE "#ifdef HAVE_BZIP2" "#if 1" _contents "${_contents}")
|
||||
file(WRITE "${HEADER}" "${_contents}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/contrib/minizip/MiniZip64_info.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/minizip RENAME copyright)
|
||||
|
@ -1,5 +1,5 @@
|
||||
Source: mlpack
|
||||
Version: 3.1.1
|
||||
Version: 3.1.1-1
|
||||
Description: mlpack is a fast, flexible machine learning library, written in C++, that aims to provide fast, extensible implementations of cutting-edge machine learning algorithms.
|
||||
Build-Depends: openblas (!osx), clapack (!osx), boost, armadillo, ensmallen
|
||||
|
||||
|
13
ports/mlpack/blas_lapack.patch
Normal file
13
ports/mlpack/blas_lapack.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b158498..50f1def 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -286,7 +286,7 @@ if (WIN32)
|
||||
find_package(LAPACK)
|
||||
find_package(BLAS)
|
||||
set(ARMADILLO_LIBRARIES
|
||||
- ${ARMADILLO_LIBRARIES} ${BLAS_LIBRARY} ${LAPACK_LIBRARY})
|
||||
+ ${ARMADILLO_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
|
||||
endif ()
|
||||
|
||||
# Include directories for the previous dependencies.
|
@ -8,6 +8,7 @@ vcpkg_from_github(
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
cmakelists.patch
|
||||
blas_lapack.patch
|
||||
)
|
||||
|
||||
file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindACML.cmake)
|
||||
|
20
ports/mongoose/CMakeLists.txt
Normal file
20
ports/mongoose/CMakeLists.txt
Normal file
@ -0,0 +1,20 @@
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project(mongoose C)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
add_library(mongoose mongoose.c)
|
||||
target_include_directories(mongoose PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
||||
set_target_properties(mongoose PROPERTIES PUBLIC_HEADER mongoose.h)
|
||||
|
||||
install(TARGETS mongoose EXPORT unofficial-mongoose-config)
|
||||
|
||||
install(
|
||||
EXPORT unofficial-mongoose-config
|
||||
NAMESPACE unofficial::mongoose::
|
||||
DESTINATION share/unofficial-mongoose
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
||||
)
|
4
ports/mongoose/CONTROL
Normal file
4
ports/mongoose/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: mongoose
|
||||
Version: 6.15-1
|
||||
Description: Embedded web server / embedded networking library
|
||||
Homepage: https://cesanta.com/
|
34
ports/mongoose/portfile.cmake
Normal file
34
ports/mongoose/portfile.cmake
Normal file
@ -0,0 +1,34 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
message(FATAL_ERROR "${PORT} does not currently support UWP")
|
||||
endif()
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO cesanta/mongoose
|
||||
REF 6.15
|
||||
SHA512 d736aeb9ccb7a67fb8180ed324d3fa26e005bfc2ede1db00d73349976bfcfb45489ce3efb178817937fae3cd9f6a6e9c4b620af8517e3ace9c53b9541539bdde
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT})
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# Handle copyright
|
||||
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
||||
|
||||
# CMake integration test
|
||||
vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT})
|
4
ports/nameof/CONTROL
Normal file
4
ports/nameof/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: nameof
|
||||
Version: 2019-07-13
|
||||
Description: Nameof operator for modern C++
|
||||
Homepage: https://github.com/Neargye/nameof
|
31
ports/nameof/portfile.cmake
Normal file
31
ports/nameof/portfile.cmake
Normal file
@ -0,0 +1,31 @@
|
||||
# header-only library
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO Neargye/nameof
|
||||
REF 9d335128265e443acf4e12ed40327e166cd8e3da
|
||||
SHA512 3d4af0069fc3dbf9a4a79ae1bea282cafb69606936a66bf43b5a13ae2f0cbc88e98dbb02a12e9c211afd73d9807b36a6f09635a1922ce5faaeb2a148672a0b13
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DNAMEOF_OPT_BUILD_EXAMPLES=OFF
|
||||
-DNAMEOF_OPT_BUILD_TESTS=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
|
||||
|
||||
# Handle copyright
|
||||
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
||||
|
||||
# CMake integration test
|
||||
vcpkg_test_cmake(PACKAGE_NAME ${PORT})
|
30
ports/nonius/CMakeLists.txt
Normal file
30
ports/nonius/CMakeLists.txt
Normal file
@ -0,0 +1,30 @@
|
||||
cmake_minimum_required(VERSION 3.9)
|
||||
cmake_policy(VERSION ${CMAKE_VERSION}) # use default policies of current cmake version
|
||||
|
||||
project(nonius)
|
||||
|
||||
add_library(nonius INTERFACE)
|
||||
target_include_directories(nonius INTERFACE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
)
|
||||
|
||||
if(NOT DISABLE_INSTALL_HEADERS)
|
||||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/
|
||||
DESTINATION include
|
||||
)
|
||||
endif()
|
||||
|
||||
install(TARGETS nonius
|
||||
EXPORT noniusExport
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
install(
|
||||
EXPORT noniusExport
|
||||
FILE noniusConfig.cmake
|
||||
NAMESPACE Nonius::
|
||||
DESTINATION share/nonius
|
||||
)
|
@ -1,4 +1,4 @@
|
||||
Source: nonius
|
||||
Version: 2019-04-20
|
||||
Version: 2019-04-20-1
|
||||
Description: A C++ micro-benchmarking framework
|
||||
Build-Depends: boost-algorithm, boost-lexical-cast, boost-math
|
||||
|
@ -10,7 +10,19 @@ vcpkg_from_github(
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY ${SOURCE_PATH}/include/${PORT} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/${PORT})
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
|
||||
|
||||
# Handle copyright
|
||||
configure_file(${SOURCE_PATH}/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
||||
|
@ -1,4 +1,5 @@
|
||||
Source: openblas
|
||||
Version: 0.3.6-4
|
||||
Version: 0.3.6-5
|
||||
Homepage: https://github.com/xianyi/OpenBLAS
|
||||
Build-Depends: pthread (linux)
|
||||
Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.
|
||||
|
816
ports/openblas/FindBLAS.cmake
Normal file
816
ports/openblas/FindBLAS.cmake
Normal file
@ -0,0 +1,816 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindBLAS
|
||||
--------
|
||||
|
||||
Find Basic Linear Algebra Subprograms (BLAS) library
|
||||
|
||||
This module finds an installed Fortran library that implements the
|
||||
BLAS linear-algebra interface (see http://www.netlib.org/blas/). The
|
||||
list of libraries searched for is taken from the ``autoconf`` macro file,
|
||||
``acx_blas.m4`` (distributed at
|
||||
http://ac-archive.sourceforge.net/ac-archive/acx_blas.html).
|
||||
|
||||
Input Variables
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
The following variables may be set to influence this module's behavior:
|
||||
|
||||
``BLA_STATIC``
|
||||
if ``ON`` use static linkage
|
||||
|
||||
``BLA_VENDOR``
|
||||
If set, checks only the specified vendor, if not set checks all the
|
||||
possibilities. List of vendors valid in this module:
|
||||
|
||||
* Goto
|
||||
* OpenBLAS
|
||||
* FLAME
|
||||
* ATLAS PhiPACK
|
||||
* CXML
|
||||
* DXML
|
||||
* SunPerf
|
||||
* SCSL
|
||||
* SGIMATH
|
||||
* IBMESSL
|
||||
* Intel10_32 (intel mkl v10 32 bit)
|
||||
* Intel10_64lp (intel mkl v10+ 64 bit, threaded code, lp64 model)
|
||||
* Intel10_64lp_seq (intel mkl v10+ 64 bit, sequential code, lp64 model)
|
||||
* Intel10_64ilp (intel mkl v10+ 64 bit, threaded code, ilp64 model)
|
||||
* Intel10_64ilp_seq (intel mkl v10+ 64 bit, sequential code, ilp64 model)
|
||||
* Intel (obsolete versions of mkl 32 and 64 bit)
|
||||
* ACML
|
||||
* ACML_MP
|
||||
* ACML_GPU
|
||||
* Apple
|
||||
* NAS
|
||||
* Generic
|
||||
|
||||
``BLA_F95``
|
||||
if ``ON`` tries to find the BLAS95 interfaces
|
||||
|
||||
``BLA_PREFER_PKGCONFIG``
|
||||
if set ``pkg-config`` will be used to search for a BLAS library first
|
||||
and if one is found that is preferred
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines the following variables:
|
||||
|
||||
``BLAS_FOUND``
|
||||
library implementing the BLAS interface is found
|
||||
``BLAS_LINKER_FLAGS``
|
||||
uncached list of required linker flags (excluding ``-l`` and ``-L``).
|
||||
``BLAS_LIBRARIES``
|
||||
uncached list of libraries (using full path name) to link against
|
||||
to use BLAS (may be empty if compiler implicitly links BLAS)
|
||||
``BLAS95_LIBRARIES``
|
||||
uncached list of libraries (using full path name) to link against
|
||||
to use BLAS95 interface
|
||||
``BLAS95_FOUND``
|
||||
library implementing the BLAS95 interface is found
|
||||
|
||||
.. note::
|
||||
|
||||
C or CXX must be enabled to use Intel Math Kernel Library (MKL)
|
||||
|
||||
For example, to use Intel MKL libraries and/or Intel compiler:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
set(BLA_VENDOR Intel10_64lp)
|
||||
find_package(BLAS)
|
||||
|
||||
Hints
|
||||
^^^^^
|
||||
|
||||
Set ``MKLROOT`` environment variable to a directory that contains an MKL
|
||||
installation.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
include(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
|
||||
include(${CMAKE_ROOT}/Modules/CheckFortranFunctionExists.cmake)
|
||||
include(${CMAKE_ROOT}/Modules/CMakePushCheckState.cmake)
|
||||
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
|
||||
cmake_push_check_state()
|
||||
set(CMAKE_REQUIRED_QUIET ${BLAS_FIND_QUIETLY})
|
||||
|
||||
set(_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
|
||||
# Check the language being used
|
||||
if( NOT (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED OR CMAKE_Fortran_COMPILER_LOADED) )
|
||||
if(BLAS_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "FindBLAS requires Fortran, C, or C++ to be enabled.")
|
||||
else()
|
||||
message(STATUS "Looking for BLAS... - NOT found (Unsupported languages)")
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(BLA_PREFER_PKGCONFIG)
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PKGC_BLAS blas)
|
||||
if(PKGC_BLAS_FOUND)
|
||||
set(BLAS_FOUND ${PKGC_BLAS_FOUND})
|
||||
set(BLAS_LIBRARIES "${PKGC_BLAS_LINK_LIBRARIES}")
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread)
|
||||
# This macro checks for the existence of the combination of fortran libraries
|
||||
# given by _list. If the combination is found, this macro checks (using the
|
||||
# Check_Fortran_Function_Exists macro) whether can link against that library
|
||||
# combination using the name of a routine given by _name using the linker
|
||||
# flags given by _flags. If the combination of libraries is found and passes
|
||||
# the link test, LIBRARIES is set to the list of complete library paths that
|
||||
# have been found. Otherwise, LIBRARIES is set to FALSE.
|
||||
|
||||
# N.B. _prefix is the prefix applied to the names of all cached variables that
|
||||
# are generated internally and marked advanced by this macro.
|
||||
|
||||
set(_libdir ${ARGN})
|
||||
|
||||
set(_libraries_work TRUE)
|
||||
set(${LIBRARIES})
|
||||
set(_combined_name)
|
||||
if (NOT _libdir)
|
||||
if (WIN32)
|
||||
set(_libdir ENV LIB)
|
||||
elseif (APPLE)
|
||||
set(_libdir ENV DYLD_LIBRARY_PATH)
|
||||
else ()
|
||||
set(_libdir ENV LD_LIBRARY_PATH)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
list(APPEND _libdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
|
||||
|
||||
foreach(_library ${_list})
|
||||
set(_combined_name ${_combined_name}_${_library})
|
||||
if(NOT "${_thread}" STREQUAL "")
|
||||
set(_combined_name ${_combined_name}_thread)
|
||||
endif()
|
||||
if(_libraries_work)
|
||||
if (BLA_STATIC)
|
||||
if (WIN32)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
endif ()
|
||||
if (APPLE)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
else ()
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
endif ()
|
||||
else ()
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
# for ubuntu's libblas3gf and liblapack3gf packages
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf)
|
||||
endif ()
|
||||
endif ()
|
||||
find_library(${_prefix}_${_library}_LIBRARY
|
||||
NAMES ${_library}
|
||||
PATHS ${_libdir}
|
||||
)
|
||||
mark_as_advanced(${_prefix}_${_library}_LIBRARY)
|
||||
set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})
|
||||
set(_libraries_work ${${_prefix}_${_library}_LIBRARY})
|
||||
endif()
|
||||
endforeach()
|
||||
if(_libraries_work)
|
||||
# Test this combination of libraries.
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_thread})
|
||||
# message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}")
|
||||
if (CMAKE_Fortran_COMPILER_LOADED)
|
||||
check_fortran_function_exists("${_name}" ${_prefix}${_combined_name}_WORKS)
|
||||
else()
|
||||
check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS)
|
||||
endif()
|
||||
set(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(_libraries_work ${${_prefix}${_combined_name}_WORKS})
|
||||
endif()
|
||||
if(_libraries_work)
|
||||
if("${_list}" STREQUAL "")
|
||||
set(${LIBRARIES} "${LIBRARIES}-PLACEHOLDER-FOR-EMPTY-LIBRARIES")
|
||||
else()
|
||||
set(${LIBRARIES} ${${LIBRARIES}} ${_thread}) # for static link
|
||||
endif()
|
||||
else()
|
||||
set(${LIBRARIES} FALSE)
|
||||
endif()
|
||||
#message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}")
|
||||
endmacro()
|
||||
|
||||
set(BLAS_LINKER_FLAGS)
|
||||
set(BLAS_LIBRARIES)
|
||||
set(BLAS95_LIBRARIES)
|
||||
if (NOT $ENV{BLA_VENDOR} STREQUAL "")
|
||||
set(BLA_VENDOR $ENV{BLA_VENDOR})
|
||||
else ()
|
||||
if(NOT BLA_VENDOR)
|
||||
set(BLA_VENDOR "All")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (BLA_VENDOR STREQUAL "All")
|
||||
if(NOT BLAS_LIBRARIES)
|
||||
# Implicitly linked BLAS libraries
|
||||
check_fortran_libraries(
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
sgemm
|
||||
""
|
||||
""
|
||||
""
|
||||
)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
#BLAS in intel mkl 10+ library? (em64t 64bit)
|
||||
if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
|
||||
if (NOT BLAS_LIBRARIES)
|
||||
|
||||
# System-specific settings
|
||||
if (WIN32)
|
||||
if (BLA_STATIC)
|
||||
set(BLAS_mkl_DLL_SUFFIX "")
|
||||
else()
|
||||
set(BLAS_mkl_DLL_SUFFIX "_dll")
|
||||
endif()
|
||||
else()
|
||||
# Switch to GNU Fortran support layer if needed (but not on Apple, where MKL does not provide it)
|
||||
if(CMAKE_Fortran_COMPILER_LOADED AND CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT APPLE)
|
||||
set(BLAS_mkl_INTFACE "gf")
|
||||
set(BLAS_mkl_THREADING "gnu")
|
||||
set(BLAS_mkl_OMP "gomp")
|
||||
else()
|
||||
set(BLAS_mkl_INTFACE "intel")
|
||||
set(BLAS_mkl_THREADING "intel")
|
||||
set(BLAS_mkl_OMP "iomp5")
|
||||
endif()
|
||||
set(BLAS_mkl_LM "-lm")
|
||||
set(BLAS_mkl_LDL "-ldl")
|
||||
endif()
|
||||
|
||||
if (BLA_VENDOR MATCHES "_64ilp")
|
||||
set(BLAS_mkl_ILP_MODE "ilp64")
|
||||
else ()
|
||||
set(BLAS_mkl_ILP_MODE "lp64")
|
||||
endif ()
|
||||
|
||||
if (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED)
|
||||
if(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED)
|
||||
find_package(Threads)
|
||||
else()
|
||||
find_package(Threads REQUIRED)
|
||||
endif()
|
||||
|
||||
set(BLAS_SEARCH_LIBS "")
|
||||
|
||||
if(BLA_F95)
|
||||
set(BLAS_mkl_SEARCH_SYMBOL sgemm_f95)
|
||||
set(_LIBRARIES BLAS95_LIBRARIES)
|
||||
if (WIN32)
|
||||
# Find the main file (32-bit or 64-bit)
|
||||
set(BLAS_SEARCH_LIBS_WIN_MAIN "")
|
||||
if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All")
|
||||
list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN
|
||||
"mkl_blas95${BLAS_mkl_DLL_SUFFIX} mkl_intel_c${BLAS_mkl_DLL_SUFFIX}")
|
||||
endif()
|
||||
if (BLA_VENDOR MATCHES "^Intel10_64i?lp" OR BLA_VENDOR STREQUAL "All")
|
||||
list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN
|
||||
"mkl_blas95_${BLAS_mkl_ILP_MODE}${BLAS_mkl_DLL_SUFFIX} mkl_intel_${BLAS_mkl_ILP_MODE}${BLAS_mkl_DLL_SUFFIX}")
|
||||
endif ()
|
||||
|
||||
# Add threading/sequential libs
|
||||
set(BLAS_SEARCH_LIBS_WIN_THREAD "")
|
||||
if (BLA_VENDOR MATCHES "_seq$" OR BLA_VENDOR STREQUAL "All")
|
||||
list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD
|
||||
"mkl_sequential${BLAS_mkl_DLL_SUFFIX}")
|
||||
endif()
|
||||
if (NOT BLA_VENDOR MATCHES "_seq$" OR BLA_VENDOR STREQUAL "All")
|
||||
# old version
|
||||
list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD
|
||||
"libguide40 mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}")
|
||||
# mkl >= 10.3
|
||||
list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD
|
||||
"libiomp5md mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}")
|
||||
endif()
|
||||
|
||||
# Cartesian product of the above
|
||||
foreach (MAIN ${BLAS_SEARCH_LIBS_WIN_MAIN})
|
||||
foreach (THREAD ${BLAS_SEARCH_LIBS_WIN_THREAD})
|
||||
list(APPEND BLAS_SEARCH_LIBS
|
||||
"${MAIN} ${THREAD} mkl_core${BLAS_mkl_DLL_SUFFIX}")
|
||||
endforeach()
|
||||
endforeach()
|
||||
else ()
|
||||
if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All")
|
||||
# old version
|
||||
list(APPEND BLAS_SEARCH_LIBS
|
||||
"mkl_blas95 mkl_${BLAS_mkl_INTFACE} mkl_${BLAS_mkl_THREADING}_thread mkl_core guide")
|
||||
|
||||
# mkl >= 10.3
|
||||
list(APPEND BLAS_SEARCH_LIBS
|
||||
"mkl_blas95 mkl_${BLAS_mkl_INTFACE} mkl_${BLAS_mkl_THREADING}_thread mkl_core ${BLAS_mkl_OMP}")
|
||||
endif ()
|
||||
if (BLA_VENDOR MATCHES "^Intel10_64i?lp$" OR BLA_VENDOR STREQUAL "All")
|
||||
# old version
|
||||
list(APPEND BLAS_SEARCH_LIBS
|
||||
"mkl_blas95 mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_THREADING}_thread mkl_core guide")
|
||||
|
||||
# mkl >= 10.3
|
||||
list(APPEND BLAS_SEARCH_LIBS
|
||||
"mkl_blas95_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_THREADING}_thread mkl_core ${BLAS_mkl_OMP}")
|
||||
endif ()
|
||||
if (BLA_VENDOR MATCHES "^Intel10_64i?lp_seq$" OR BLA_VENDOR STREQUAL "All")
|
||||
list(APPEND BLAS_SEARCH_LIBS
|
||||
"mkl_blas95_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_sequential mkl_core")
|
||||
endif ()
|
||||
endif ()
|
||||
else ()
|
||||
set(BLAS_mkl_SEARCH_SYMBOL sgemm)
|
||||
set(_LIBRARIES BLAS_LIBRARIES)
|
||||
if (WIN32)
|
||||
# Find the main file (32-bit or 64-bit)
|
||||
set(BLAS_SEARCH_LIBS_WIN_MAIN "")
|
||||
if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All")
|
||||
list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN
|
||||
"mkl_intel_c${BLAS_mkl_DLL_SUFFIX}")
|
||||
endif()
|
||||
if (BLA_VENDOR MATCHES "^Intel10_64i?lp" OR BLA_VENDOR STREQUAL "All")
|
||||
list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN
|
||||
"mkl_intel_${BLAS_mkl_ILP_MODE}${BLAS_mkl_DLL_SUFFIX}")
|
||||
endif ()
|
||||
|
||||
# Add threading/sequential libs
|
||||
set(BLAS_SEARCH_LIBS_WIN_THREAD "")
|
||||
if (NOT BLA_VENDOR MATCHES "_seq$" OR BLA_VENDOR STREQUAL "All")
|
||||
# old version
|
||||
list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD
|
||||
"libguide40 mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}")
|
||||
# mkl >= 10.3
|
||||
list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD
|
||||
"libiomp5md mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}")
|
||||
endif()
|
||||
if (BLA_VENDOR MATCHES "_seq$" OR BLA_VENDOR STREQUAL "All")
|
||||
list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD
|
||||
"mkl_sequential${BLAS_mkl_DLL_SUFFIX}")
|
||||
endif()
|
||||
|
||||
# Cartesian product of the above
|
||||
foreach (MAIN ${BLAS_SEARCH_LIBS_WIN_MAIN})
|
||||
foreach (THREAD ${BLAS_SEARCH_LIBS_WIN_THREAD})
|
||||
list(APPEND BLAS_SEARCH_LIBS
|
||||
"${MAIN} ${THREAD} mkl_core${BLAS_mkl_DLL_SUFFIX}")
|
||||
endforeach()
|
||||
endforeach()
|
||||
else ()
|
||||
if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All")
|
||||
# old version
|
||||
list(APPEND BLAS_SEARCH_LIBS
|
||||
"mkl_${BLAS_mkl_INTFACE} mkl_${BLAS_mkl_THREADING}_thread mkl_core guide")
|
||||
|
||||
# mkl >= 10.3
|
||||
list(APPEND BLAS_SEARCH_LIBS
|
||||
"mkl_${BLAS_mkl_INTFACE} mkl_${BLAS_mkl_THREADING}_thread mkl_core ${BLAS_mkl_OMP}")
|
||||
endif ()
|
||||
if (BLA_VENDOR MATCHES "^Intel10_64i?lp$" OR BLA_VENDOR STREQUAL "All")
|
||||
# old version
|
||||
list(APPEND BLAS_SEARCH_LIBS
|
||||
"mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_THREADING}_thread mkl_core guide")
|
||||
|
||||
# mkl >= 10.3
|
||||
list(APPEND BLAS_SEARCH_LIBS
|
||||
"mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_THREADING}_thread mkl_core ${BLAS_mkl_OMP}")
|
||||
endif ()
|
||||
if (BLA_VENDOR MATCHES "^Intel10_64i?lp_seq$" OR BLA_VENDOR STREQUAL "All")
|
||||
list(APPEND BLAS_SEARCH_LIBS
|
||||
"mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_sequential mkl_core")
|
||||
endif ()
|
||||
|
||||
#older vesions of intel mkl libs
|
||||
if (BLA_VENDOR STREQUAL "Intel" OR BLA_VENDOR STREQUAL "All")
|
||||
list(APPEND BLAS_SEARCH_LIBS
|
||||
"mkl")
|
||||
list(APPEND BLAS_SEARCH_LIBS
|
||||
"mkl_ia32")
|
||||
list(APPEND BLAS_SEARCH_LIBS
|
||||
"mkl_em64t")
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (DEFINED ENV{MKLROOT})
|
||||
if (BLA_VENDOR STREQUAL "Intel10_32")
|
||||
set(_BLAS_MKLROOT_LIB_DIR "$ENV{MKLROOT}/lib/ia32")
|
||||
elseif (BLA_VENDOR MATCHES "^Intel10_64i?lp$" OR BLA_VENDOR MATCHES "^Intel10_64i?lp_seq$")
|
||||
set(_BLAS_MKLROOT_LIB_DIR "$ENV{MKLROOT}/lib/intel64")
|
||||
endif ()
|
||||
endif ()
|
||||
if (_BLAS_MKLROOT_LIB_DIR)
|
||||
if (WIN32)
|
||||
string(APPEND _BLAS_MKLROOT_LIB_DIR "_win")
|
||||
elseif (APPLE)
|
||||
string(APPEND _BLAS_MKLROOT_LIB_DIR "_mac")
|
||||
else ()
|
||||
string(APPEND _BLAS_MKLROOT_LIB_DIR "_lin")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
foreach (IT ${BLAS_SEARCH_LIBS})
|
||||
string(REPLACE " " ";" SEARCH_LIBS ${IT})
|
||||
if (NOT ${_LIBRARIES})
|
||||
check_fortran_libraries(
|
||||
${_LIBRARIES}
|
||||
BLAS
|
||||
${BLAS_mkl_SEARCH_SYMBOL}
|
||||
""
|
||||
"${SEARCH_LIBS}"
|
||||
"${CMAKE_THREAD_LIBS_INIT};${BLAS_mkl_LM};${BLAS_mkl_LDL}"
|
||||
"${_BLAS_MKLROOT_LIB_DIR}"
|
||||
)
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
endif ()
|
||||
unset(BLAS_mkl_ILP_MODE)
|
||||
unset(BLAS_mkl_INTFACE)
|
||||
unset(BLAS_mkl_THREADING)
|
||||
unset(BLAS_mkl_OMP)
|
||||
unset(BLAS_mkl_DLL_SUFFIX)
|
||||
unset(BLAS_mkl_LM)
|
||||
unset(BLAS_mkl_LDL)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if(BLA_F95)
|
||||
find_package_handle_standard_args(BLAS REQUIRED_VARS BLAS95_LIBRARIES)
|
||||
set(BLAS95_FOUND ${BLAS_FOUND})
|
||||
if(BLAS_FOUND)
|
||||
set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
|
||||
if(NOT BLAS_LIBRARIES)
|
||||
# gotoblas (http://www.tacc.utexas.edu/tacc-projects/gotoblas2)
|
||||
check_fortran_libraries(
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
sgemm
|
||||
""
|
||||
"goto2"
|
||||
""
|
||||
)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All")
|
||||
if(NOT BLAS_LIBRARIES)
|
||||
# OpenBLAS (http://www.openblas.net)
|
||||
check_fortran_libraries(
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
sgemm
|
||||
""
|
||||
"openblas"
|
||||
""
|
||||
)
|
||||
endif()
|
||||
if(NOT BLAS_LIBRARIES)
|
||||
find_package(Threads)
|
||||
# OpenBLAS (http://www.openblas.net)
|
||||
check_fortran_libraries(
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
sgemm
|
||||
""
|
||||
"openblas"
|
||||
"${CMAKE_THREAD_LIBS_INIT}"
|
||||
)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (BLA_VENDOR STREQUAL "FLAME" OR BLA_VENDOR STREQUAL "All")
|
||||
if(NOT BLAS_LIBRARIES)
|
||||
# FLAME's blis library (https://github.com/flame/blis)
|
||||
check_fortran_libraries(
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
sgemm
|
||||
""
|
||||
"blis"
|
||||
""
|
||||
)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All")
|
||||
if(NOT BLAS_LIBRARIES)
|
||||
# BLAS in ATLAS library? (http://math-atlas.sourceforge.net/)
|
||||
check_fortran_libraries(
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
dgemm
|
||||
""
|
||||
"f77blas;atlas"
|
||||
""
|
||||
)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
# BLAS in PhiPACK libraries? (requires generic BLAS lib, too)
|
||||
if (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All")
|
||||
if(NOT BLAS_LIBRARIES)
|
||||
check_fortran_libraries(
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
sgemm
|
||||
""
|
||||
"sgemm;dgemm;blas"
|
||||
""
|
||||
)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
# BLAS in Alpha CXML library?
|
||||
if (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All")
|
||||
if(NOT BLAS_LIBRARIES)
|
||||
check_fortran_libraries(
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
sgemm
|
||||
""
|
||||
"cxml"
|
||||
""
|
||||
)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
# BLAS in Alpha DXML library? (now called CXML, see above)
|
||||
if (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All")
|
||||
if(NOT BLAS_LIBRARIES)
|
||||
check_fortran_libraries(
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
sgemm
|
||||
""
|
||||
"dxml"
|
||||
""
|
||||
)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
# BLAS in Sun Performance library?
|
||||
if (BLA_VENDOR STREQUAL "SunPerf" OR BLA_VENDOR STREQUAL "All")
|
||||
if(NOT BLAS_LIBRARIES)
|
||||
check_fortran_libraries(
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
sgemm
|
||||
"-xlic_lib=sunperf"
|
||||
"sunperf;sunmath"
|
||||
""
|
||||
)
|
||||
if(BLAS_LIBRARIES)
|
||||
set(BLAS_LINKER_FLAGS "-xlic_lib=sunperf")
|
||||
endif()
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
# BLAS in SCSL library? (SGI/Cray Scientific Library)
|
||||
if (BLA_VENDOR STREQUAL "SCSL" OR BLA_VENDOR STREQUAL "All")
|
||||
if(NOT BLAS_LIBRARIES)
|
||||
check_fortran_libraries(
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
sgemm
|
||||
""
|
||||
"scsl"
|
||||
""
|
||||
)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
# BLAS in SGIMATH library?
|
||||
if (BLA_VENDOR STREQUAL "SGIMATH" OR BLA_VENDOR STREQUAL "All")
|
||||
if(NOT BLAS_LIBRARIES)
|
||||
check_fortran_libraries(
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
sgemm
|
||||
""
|
||||
"complib.sgimath"
|
||||
""
|
||||
)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
# BLAS in IBM ESSL library? (requires generic BLAS lib, too)
|
||||
if (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All")
|
||||
if(NOT BLAS_LIBRARIES)
|
||||
check_fortran_libraries(
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
sgemm
|
||||
""
|
||||
"essl;blas"
|
||||
""
|
||||
)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
#BLAS in acml library?
|
||||
if (BLA_VENDOR MATCHES "ACML" OR BLA_VENDOR STREQUAL "All")
|
||||
if( ((BLA_VENDOR STREQUAL "ACML") AND (NOT BLAS_ACML_LIB_DIRS)) OR
|
||||
((BLA_VENDOR STREQUAL "ACML_MP") AND (NOT BLAS_ACML_MP_LIB_DIRS)) OR
|
||||
((BLA_VENDOR STREQUAL "ACML_GPU") AND (NOT BLAS_ACML_GPU_LIB_DIRS))
|
||||
)
|
||||
# try to find acml in "standard" paths
|
||||
if( WIN32 )
|
||||
file( GLOB _ACML_ROOT "C:/AMD/acml*/ACML-EULA.txt" )
|
||||
else()
|
||||
file( GLOB _ACML_ROOT "/opt/acml*/ACML-EULA.txt" )
|
||||
endif()
|
||||
if( WIN32 )
|
||||
file( GLOB _ACML_GPU_ROOT "C:/AMD/acml*/GPGPUexamples" )
|
||||
else()
|
||||
file( GLOB _ACML_GPU_ROOT "/opt/acml*/GPGPUexamples" )
|
||||
endif()
|
||||
list(GET _ACML_ROOT 0 _ACML_ROOT)
|
||||
list(GET _ACML_GPU_ROOT 0 _ACML_GPU_ROOT)
|
||||
if( _ACML_ROOT )
|
||||
get_filename_component( _ACML_ROOT ${_ACML_ROOT} PATH )
|
||||
if( SIZEOF_INTEGER EQUAL 8 )
|
||||
set( _ACML_PATH_SUFFIX "_int64" )
|
||||
else()
|
||||
set( _ACML_PATH_SUFFIX "" )
|
||||
endif()
|
||||
if( CMAKE_Fortran_COMPILER_ID STREQUAL "Intel" )
|
||||
set( _ACML_COMPILER32 "ifort32" )
|
||||
set( _ACML_COMPILER64 "ifort64" )
|
||||
elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "SunPro" )
|
||||
set( _ACML_COMPILER32 "sun32" )
|
||||
set( _ACML_COMPILER64 "sun64" )
|
||||
elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "PGI" )
|
||||
set( _ACML_COMPILER32 "pgi32" )
|
||||
if( WIN32 )
|
||||
set( _ACML_COMPILER64 "win64" )
|
||||
else()
|
||||
set( _ACML_COMPILER64 "pgi64" )
|
||||
endif()
|
||||
elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "Open64" )
|
||||
# 32 bit builds not supported on Open64 but for code simplicity
|
||||
# We'll just use the same directory twice
|
||||
set( _ACML_COMPILER32 "open64_64" )
|
||||
set( _ACML_COMPILER64 "open64_64" )
|
||||
elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "NAG" )
|
||||
set( _ACML_COMPILER32 "nag32" )
|
||||
set( _ACML_COMPILER64 "nag64" )
|
||||
else()
|
||||
set( _ACML_COMPILER32 "gfortran32" )
|
||||
set( _ACML_COMPILER64 "gfortran64" )
|
||||
endif()
|
||||
|
||||
if( BLA_VENDOR STREQUAL "ACML_MP" )
|
||||
set(_ACML_MP_LIB_DIRS
|
||||
"${_ACML_ROOT}/${_ACML_COMPILER32}_mp${_ACML_PATH_SUFFIX}/lib"
|
||||
"${_ACML_ROOT}/${_ACML_COMPILER64}_mp${_ACML_PATH_SUFFIX}/lib" )
|
||||
else()
|
||||
set(_ACML_LIB_DIRS
|
||||
"${_ACML_ROOT}/${_ACML_COMPILER32}${_ACML_PATH_SUFFIX}/lib"
|
||||
"${_ACML_ROOT}/${_ACML_COMPILER64}${_ACML_PATH_SUFFIX}/lib" )
|
||||
endif()
|
||||
endif()
|
||||
elseif(BLAS_${BLA_VENDOR}_LIB_DIRS)
|
||||
set(_${BLA_VENDOR}_LIB_DIRS ${BLAS_${BLA_VENDOR}_LIB_DIRS})
|
||||
endif()
|
||||
|
||||
if( BLA_VENDOR STREQUAL "ACML_MP" )
|
||||
foreach( BLAS_ACML_MP_LIB_DIRS ${_ACML_MP_LIB_DIRS})
|
||||
check_fortran_libraries (
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
sgemm
|
||||
"" "acml_mp;acml_mv" "" ${BLAS_ACML_MP_LIB_DIRS}
|
||||
)
|
||||
if( BLAS_LIBRARIES )
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
elseif( BLA_VENDOR STREQUAL "ACML_GPU" )
|
||||
foreach( BLAS_ACML_GPU_LIB_DIRS ${_ACML_GPU_LIB_DIRS})
|
||||
check_fortran_libraries (
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
sgemm
|
||||
"" "acml;acml_mv;CALBLAS" "" ${BLAS_ACML_GPU_LIB_DIRS}
|
||||
)
|
||||
if( BLAS_LIBRARIES )
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
foreach( BLAS_ACML_LIB_DIRS ${_ACML_LIB_DIRS} )
|
||||
check_fortran_libraries (
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
sgemm
|
||||
"" "acml;acml_mv" "" ${BLAS_ACML_LIB_DIRS}
|
||||
)
|
||||
if( BLAS_LIBRARIES )
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Either acml or acml_mp should be in LD_LIBRARY_PATH but not both
|
||||
if(NOT BLAS_LIBRARIES)
|
||||
check_fortran_libraries(
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
sgemm
|
||||
""
|
||||
"acml;acml_mv"
|
||||
""
|
||||
)
|
||||
endif()
|
||||
if(NOT BLAS_LIBRARIES)
|
||||
check_fortran_libraries(
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
sgemm
|
||||
""
|
||||
"acml_mp;acml_mv"
|
||||
""
|
||||
)
|
||||
endif()
|
||||
if(NOT BLAS_LIBRARIES)
|
||||
check_fortran_libraries(
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
sgemm
|
||||
""
|
||||
"acml;acml_mv;CALBLAS"
|
||||
""
|
||||
)
|
||||
endif()
|
||||
endif () # ACML
|
||||
|
||||
# Apple BLAS library?
|
||||
if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All")
|
||||
if(NOT BLAS_LIBRARIES)
|
||||
check_fortran_libraries(
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
dgemm
|
||||
""
|
||||
"Accelerate"
|
||||
""
|
||||
)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
|
||||
if ( NOT BLAS_LIBRARIES )
|
||||
check_fortran_libraries(
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
dgemm
|
||||
""
|
||||
"vecLib"
|
||||
""
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Generic BLAS library?
|
||||
if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All")
|
||||
if(NOT BLAS_LIBRARIES)
|
||||
check_fortran_libraries(
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
sgemm
|
||||
""
|
||||
"blas"
|
||||
""
|
||||
)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if(NOT BLA_F95)
|
||||
find_package_handle_standard_args(BLAS REQUIRED_VARS BLAS_LIBRARIES)
|
||||
endif()
|
||||
|
||||
# On compilers that implicitly link BLAS (such as ftn, cc, and CC on Cray HPC machines)
|
||||
# we used a placeholder for empty BLAS_LIBRARIES to get through our logic above.
|
||||
if (BLAS_LIBRARIES STREQUAL "BLAS_LIBRARIES-PLACEHOLDER-FOR-EMPTY-LIBRARIES")
|
||||
set(BLAS_LIBRARIES "")
|
||||
endif()
|
||||
|
||||
cmake_pop_check_state()
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
|
@ -1,70 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9696961..47ef712 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -29,7 +29,7 @@ option(BUILD_RELAPACK "Build with ReLAPACK (recursive implementation of several
|
||||
# 64 bit integer interfaces in OpenBLAS.
|
||||
|
||||
set(SYMBOLPREFIX "" CACHE STRING "Add a prefix to all exported symbol names in the shared library to avoid conflicts with other BLAS libraries" )
|
||||
-set(SYMBOLSUFFIX "" CACHE STRING "Add a suffix to all exported symbol names in the shared library, e.g. _64 for INTERFACE64 builds" )
|
||||
+set(SYMBOLSUFFIX "_" CACHE STRING "Add a suffix to all exported symbol names in the shared library, e.g. _64 for INTERFACE64 builds" )
|
||||
#######
|
||||
if(BUILD_WITHOUT_LAPACK)
|
||||
set(NO_LAPACK 1)
|
||||
@@ -232,7 +232,7 @@ if (BUILD_SHARED_LIBS AND BUILD_RELAPACK)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-if (BUILD_SHARED_LIBS AND NOT ${SYMBOLPREFIX}${SYMBOLSUFIX} STREQUAL "")
|
||||
+if (NOT ${SYMBOLPREFIX}${SYMBOLSUFFIX} STREQUAL "")
|
||||
if (NOT DEFINED ARCH)
|
||||
set(ARCH_IN "x86_64")
|
||||
else()
|
||||
@@ -289,12 +289,14 @@ endif()
|
||||
if (NOT ${SYMBOLSUFFIX} STREQUAL "")
|
||||
message(STATUS "adding suffix ${SYMBOLSUFFIX} to names of exported symbols in ${OpenBLAS_LIBNAME}")
|
||||
endif()
|
||||
+if(BUILD_SHARED_LIBS)
|
||||
add_custom_command(TARGET ${OpenBLAS_LIBNAME} POST_BUILD
|
||||
COMMAND perl ${PROJECT_SOURCE_DIR}/exports/gensymbol "objcopy" "${ARCH}" "${BU}" "${EXPRECISION_IN}" "${NO_CBLAS_IN}" "${NO_LAPACK_IN}" "${NO_LAPACKE_IN}" "${NEED2UNDERSCORES_IN}" "${ONLY_CBLAS_IN}" \"${SYMBOLPREFIX}\" \"${SYMBOLSUFFIX}\" "${BUILD_LAPACK_DEPRECATED}" > ${PROJECT_BINARY_DIR}/objcopy.def
|
||||
COMMAND objcopy -v --redefine-syms ${PROJECT_BINARY_DIR}/objcopy.def ${PROJECT_BINARY_DIR}/lib/lib${OpenBLAS_LIBNAME}.so
|
||||
COMMENT "renaming symbols"
|
||||
)
|
||||
endif()
|
||||
+endif()
|
||||
|
||||
|
||||
# Install project
|
||||
@@ -385,4 +387,3 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PN}ConfigVersion.cmake
|
||||
install(EXPORT "${PN}${SUFFIX64}Targets"
|
||||
NAMESPACE "${PN}${SUFFIX64}::"
|
||||
DESTINATION ${CMAKECONFIG_INSTALL_DIR})
|
||||
-
|
||||
diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake
|
||||
index 259ef16..936fbf7 100644
|
||||
--- a/cmake/prebuild.cmake
|
||||
+++ b/cmake/prebuild.cmake
|
||||
@@ -58,10 +58,8 @@ endif ()
|
||||
set(TARGET_CONF_TEMP "${PROJECT_BINARY_DIR}/${TARGET_CONF}.tmp")
|
||||
|
||||
# c_check
|
||||
-set(FU "")
|
||||
-if (APPLE OR (MSVC AND NOT ${CMAKE_C_COMPILER_ID} MATCHES "Clang"))
|
||||
- set(FU "_")
|
||||
-endif()
|
||||
+set(FU "")
|
||||
+set(BU "")
|
||||
|
||||
set(COMPILER_ID ${CMAKE_C_COMPILER_ID})
|
||||
if (${COMPILER_ID} STREQUAL "GNU")
|
||||
@@ -75,7 +73,9 @@ file(WRITE ${TARGET_CONF_TEMP}
|
||||
"#define ARCH_${UC_ARCH}\t1\n"
|
||||
"#define C_${COMPILER_ID}\t1\n"
|
||||
"#define __${BINARY}BIT__\t1\n"
|
||||
- "#define FUNDERSCORE\t${FU}\n")
|
||||
+ "#define FUNDERSCORE\t${FU}\n"
|
||||
+ "#define BUNDERSCORE\t${BU}\n"
|
||||
+ "//#define NEEDBUNDERSCORE 1\n")
|
||||
|
||||
if (${HOST_OS} STREQUAL "WINDOWSSTORE")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
72
ports/openblas/openblas_common.h
Normal file
72
ports/openblas/openblas_common.h
Normal file
@ -0,0 +1,72 @@
|
||||
#pragma once
|
||||
#include "openblas_config.h"
|
||||
|
||||
#if defined(OPENBLAS_OS_WINNT) || defined(OPENBLAS_OS_CYGWIN_NT) || defined(OPENBLAS_OS_INTERIX)
|
||||
#define OPENBLAS_WINDOWS_ABI
|
||||
#define OPENBLAS_OS_WINDOWS
|
||||
|
||||
#ifdef DOUBLE
|
||||
#define DOUBLE_DEFINED DOUBLE
|
||||
#undef DOUBLE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef NEEDBUNDERSCORE
|
||||
#define BLASFUNC(FUNC) FUNC##_
|
||||
#else
|
||||
#define BLASFUNC(FUNC) FUNC
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef OPENBLAS_QUAD_PRECISION
|
||||
typedef struct {
|
||||
unsigned long x[2];
|
||||
} xdouble;
|
||||
#elif defined OPENBLAS_EXPRECISION
|
||||
#define xdouble long double
|
||||
#else
|
||||
#define xdouble double
|
||||
#endif
|
||||
|
||||
#if defined(OS_WINNT) && defined(__64BIT__)
|
||||
typedef long long BLASLONG;
|
||||
typedef unsigned long long BLASULONG;
|
||||
#else
|
||||
typedef long BLASLONG;
|
||||
typedef unsigned long BLASULONG;
|
||||
#endif
|
||||
|
||||
#ifdef OPENBLAS_USE64BITINT
|
||||
typedef BLASLONG blasint;
|
||||
#else
|
||||
typedef int blasint;
|
||||
#endif
|
||||
|
||||
#if defined(XDOUBLE) || defined(DOUBLE)
|
||||
#define FLOATRET FLOAT
|
||||
#else
|
||||
#ifdef NEED_F2CCONV
|
||||
#define FLOATRET double
|
||||
#else
|
||||
#define FLOATRET float
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* Inclusion of a standard header file is needed for definition of __STDC_*
|
||||
predefined macros with some compilers (e.g. GCC 4.7 on Linux). This occurs
|
||||
as a side effect of including either <features.h> or <stdc-predef.h>. */
|
||||
#include <stdio.h>
|
||||
#define OPENBLAS_COMPLEX_STRUCT
|
||||
typedef struct { float real, imag; } openblas_complex_float;
|
||||
typedef struct { double real, imag; } openblas_complex_double;
|
||||
typedef struct { xdouble real, imag; } openblas_complex_xdouble;
|
||||
#define openblas_make_complex_float(real, imag) {(real), (imag)}
|
||||
#define openblas_make_complex_double(real, imag) {(real), (imag)}
|
||||
#define openblas_make_complex_xdouble(real, imag) {(real), (imag)}
|
||||
#define openblas_complex_float_real(z) ((z).real)
|
||||
#define openblas_complex_float_imag(z) ((z).imag)
|
||||
#define openblas_complex_double_real(z) ((z).real)
|
||||
#define openblas_complex_double_imag(z) ((z).imag)
|
||||
#define openblas_complex_xdouble_real(z) ((z).real)
|
||||
#define openblas_complex_xdouble_imag(z) ((z).imag)
|
@ -1,26 +1,9 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
message(WARNING "You do not need this package on macOS, since you already have the Accelerate Framework")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
||||
message(FATAL_ERROR "openblas can only be built for x64 currently")
|
||||
endif()
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(ADDITIONAL_PATCH "enable_underscore.patch")
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
set(NO_SHARED 1)
|
||||
endif()
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
set(NO_STATIC 1)
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO xianyi/OpenBLAS
|
||||
@ -29,8 +12,7 @@ vcpkg_from_github(
|
||||
HEAD_REF develop
|
||||
PATCHES
|
||||
uwp.patch
|
||||
fix_space_path.patch
|
||||
${ADDITIONAL_PATCH}
|
||||
fix-space-path.patch
|
||||
)
|
||||
|
||||
find_program(GIT NAMES git git.cmd)
|
||||
@ -77,7 +59,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
OPTIONS
|
||||
${COMMON_OPTIONS}
|
||||
-DCMAKE_SYSTEM_PROCESSOR=AMD64
|
||||
-DVS_WINRT_COMPONENT=TRUE
|
||||
@ -85,29 +67,44 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
|
||||
elseif(NOT VCPKG_CMAKE_SYSTEM_NAME)
|
||||
vcpkg_configure_cmake(
|
||||
PREFER_NINJA
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
${COMMON_OPTIONS})
|
||||
else()
|
||||
list(APPEND VCPKG_C_FLAGS "-DNEEDBUNDERSCORE") # Required to get common BLASFUNC to append extra _
|
||||
list(APPEND VCPKG_CXX_FLAGS "-DNEEDBUNDERSCORE")
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
${COMMON_OPTIONS}
|
||||
-DTARGET=SANDYBRIDGE
|
||||
-DCMAKE_SYSTEM_PROCESSOR=AMD64
|
||||
-DBINARY=64
|
||||
-DNO_SHARED=${NO_SHARED}
|
||||
-DNO_STATIC=${NO_STATIC}
|
||||
-DNOFORTRAN=ON)
|
||||
-DNOFORTRAN=ON
|
||||
-DBU=_ #required for all blas functions to append extra _ using NAME
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/OpenBLAS)
|
||||
#we install a cmake wrapper since the official FindBLAS thinks that OpenBLAS can solve also LAPACK libraries, while it cannot because we disabled it and we use CLAPACK... maybe we have to trigger finding one package when requesting the other and vice-versa. Wrappers should be ready also to avoid an infinite loop
|
||||
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/blas)
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/OpenBLAS TARGET_PATH share/openblas)
|
||||
#maybe we need also to write a wrapper inside share/blas to search implicitly for openblas, whenever we feel it's ready for its own -config.cmake file
|
||||
|
||||
# openblas do not make the config file , so I manually made this
|
||||
# but I think in most case, libraries will not include these files, they define their own used function prototypes
|
||||
# this is only to quite vcpkg
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/openblas_common.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
|
||||
file(READ ${SOURCE_PATH}/cblas.h CBLAS_H)
|
||||
string(REPLACE "#include \"common.h\"" "#include \"openblas_common.h\"" CBLAS_H "${CBLAS_H}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/cblas.h "${CBLAS_H}")
|
||||
|
||||
# openblas is BSD
|
||||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openblas)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/openblas/LICENSE ${CURRENT_PACKAGES_DIR}/share/openblas/copyright)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/blas)
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindBLAS.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/blas)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openblas RENAME copyright)
|
||||
|
@ -1,49 +1,2 @@
|
||||
list(REMOVE_ITEM ARGS "BLAS")
|
||||
list(REMOVE_ITEM ARGS "blas")
|
||||
list(REMOVE_ITEM ARGS "Blas")
|
||||
list(REMOVE_ITEM ARGS "NO_MODULE")
|
||||
list(REMOVE_ITEM ARGS "CONFIG")
|
||||
list(REMOVE_ITEM ARGS "MODULE")
|
||||
if(NOT BLAS_LIBRARY OR BLAS_LIBRARIES OR OpenBLAS_LIBRARY OR OpenBLAS_LIBRARIES OR BLAS_LIB OR BLAS_LIBS)
|
||||
include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake)
|
||||
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
|
||||
|
||||
_find_package(OpenBLAS CONFIG ${ARGS})
|
||||
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||
_find_package(Threads)
|
||||
|
||||
get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
set(BLAS_INCLUDE_DIR ${_loc})
|
||||
get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_IMPLIB_RELEASE)
|
||||
if(NOT _loc)
|
||||
get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY LOCATION_RELEASE)
|
||||
endif()
|
||||
set(BLAS_LIBRARY_RELEASE ${_loc})
|
||||
get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_IMPLIB_DEBUG)
|
||||
if(NOT _loc)
|
||||
get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY LOCATION_DEBUG)
|
||||
endif()
|
||||
set(BLAS_LIBRARY_DEBUG ${_loc})
|
||||
list(APPEND BLAS_LIBRARY_RELEASE Threads::Threads)
|
||||
list(APPEND BLAS_LIBRARY_DEBUG Threads::Threads)
|
||||
select_library_configurations(BLAS)
|
||||
|
||||
set(BLAS_LIBRARY "${BLAS_LIBRARY}" CACHE STRING "" FORCE)
|
||||
set(BLAS_LIBRARIES "${BLAS_LIBRARY}" CACHE STRING "" FORCE)
|
||||
set(OpenBLAS_LIBRARY "${BLAS_LIBRARY}" CACHE STRING "" FORCE)
|
||||
set(OpenBLAS_LIBRARIES "${BLAS_LIBRARY}" CACHE STRING "" FORCE)
|
||||
set(BLAS_LIB "${BLAS_LIBRARY}" CACHE STRING "" FORCE)
|
||||
set(BLAS_LIBS "${BLAS_LIBRARY}" CACHE STRING "" FORCE)
|
||||
|
||||
set(BLAS_INCLUDE_DIR "${BLAS_INCLUDE_DIR}" CACHE STRING "" FORCE)
|
||||
set(BLAS_INCLUDE_DIRS "${BLAS_INCLUDE_DIR}" CACHE STRING "" FORCE)
|
||||
set(OpenBLAS_INCLUDE_DIR "${BLAS_INCLUDE_DIR}" CACHE STRING "" FORCE)
|
||||
set(OpenBLAS_INCLUDE_DIRS "${BLAS_INCLUDE_DIR}" CACHE STRING "" FORCE)
|
||||
set(BLAS_INC "${BLAS_INCLUDE_DIR}" CACHE STRING "" FORCE)
|
||||
|
||||
find_package_handle_standard_args(BLAS DEFAULT_MSG BLAS_LIBRARY BLAS_INCLUDE_DIR)
|
||||
mark_as_advanced(BLAS_INCLUDE_DIR BLAS_LIBRARY)
|
||||
find_package_handle_standard_args(OpenBLAS DEFAULT_MSG OpenBLAS_LIBRARY OpenBLAS_INCLUDE_DIR)
|
||||
mark_as_advanced(OpenBLAS_INCLUDE_DIR OpenBLAS_LIBRARY)
|
||||
endif()
|
||||
message(STATUS "Using VCPKG FindBLAS. Remove if CMake has been updated to account for Threads in OpenBLAS!")
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindBLAS.cmake)
|
||||
|
35
ports/openxr-loader/0001-fix-embedded-python-path.patch
Normal file
35
ports/openxr-loader/0001-fix-embedded-python-path.patch
Normal file
@ -0,0 +1,35 @@
|
||||
diff --git a/specification/scripts/genxr.py b/specification/scripts/genxr.py
|
||||
index 906c044..b0a414f 100755
|
||||
--- a/specification/scripts/genxr.py
|
||||
+++ b/specification/scripts/genxr.py
|
||||
@@ -17,6 +17,12 @@
|
||||
import argparse
|
||||
import re
|
||||
import sys
|
||||
+import os
|
||||
+
|
||||
+base_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
|
||||
+sys.path.append(os.path.join(base_dir, 'src', 'scripts'))
|
||||
+sys.path.append(os.path.join(base_dir, 'specification', 'scripts'))
|
||||
+
|
||||
import time
|
||||
import xml.etree.ElementTree as etree
|
||||
|
||||
diff --git a/src/scripts/src_genxr.py b/src/scripts/src_genxr.py
|
||||
index 960b6cd..6f49296 100755
|
||||
--- a/src/scripts/src_genxr.py
|
||||
+++ b/src/scripts/src_genxr.py
|
||||
@@ -14,7 +14,12 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
-import argparse, cProfile, pdb, string, sys, time
|
||||
+import argparse, cProfile, pdb, string, sys, time, os
|
||||
+
|
||||
+base_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
|
||||
+sys.path.append(os.path.join(base_dir, 'src', 'scripts'))
|
||||
+sys.path.append(os.path.join(base_dir, 'specification', 'scripts'))
|
||||
+
|
||||
from reg import *
|
||||
from generator import write
|
||||
from cgenerator import CGeneratorOptions, COutputGenerator
|
@ -0,0 +1,38 @@
|
||||
diff --git a/src/cmake/presentation.cmake b/src/cmake/presentation.cmake
|
||||
index 3970546..c2e7bc3 100644
|
||||
--- a/src/cmake/presentation.cmake
|
||||
+++ b/src/cmake/presentation.cmake
|
||||
@@ -12,21 +12,17 @@ endif()
|
||||
|
||||
message(STATUS "Using presentation backend: ${PRESENTATION_BACKEND}")
|
||||
|
||||
-find_package(PkgConfig REQUIRED)
|
||||
|
||||
if( PRESENTATION_BACKEND MATCHES "xlib" )
|
||||
- pkg_search_module(X11 REQUIRED x11)
|
||||
- pkg_search_module(XXF86VM REQUIRED xxf86vm)
|
||||
- pkg_search_module(XRANDR REQUIRED xrandr)
|
||||
-
|
||||
add_definitions( -DSUPPORT_X )
|
||||
add_definitions( -DOS_LINUX_XLIB )
|
||||
set( XLIB_LIBRARIES
|
||||
- ${X11_LIBRARIES}
|
||||
- ${XXF86VM_LIBRARIES}
|
||||
- ${XRANDR_LIBRARIES} )
|
||||
+ X11
|
||||
+ Xxf86vm
|
||||
+ Xrandr)
|
||||
|
||||
elseif( PRESENTATION_BACKEND MATCHES "xcb" )
|
||||
+ find_package(PkgConfig REQUIRED)
|
||||
# XCB + XCB GLX is limited to OpenGL 2.1
|
||||
# add_definitions( -DOS_LINUX_XCB )
|
||||
# XCB + Xlib GLX 1.3
|
||||
@@ -49,6 +45,7 @@ elseif( PRESENTATION_BACKEND MATCHES "xcb" )
|
||||
${X11_LIBRARIES} )
|
||||
|
||||
elseif( PRESENTATION_BACKEND MATCHES "wayland" )
|
||||
+ find_package(PkgConfig REQUIRED)
|
||||
pkg_search_module(WAYLAND_CLIENT REQUIRED wayland-client)
|
||||
pkg_search_module(WAYLAND_EGL REQUIRED wayland-egl)
|
||||
pkg_search_module(WAYLAND_SCANNER REQUIRED wayland-scanner)
|
16
ports/openxr-loader/0003-windows-path-python-fix.patch
Normal file
16
ports/openxr-loader/0003-windows-path-python-fix.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff --git a/specification/scripts/generator.py b/specification/scripts/generator.py
|
||||
index d6a1afe..5f9d0b6 100644
|
||||
--- a/specification/scripts/generator.py
|
||||
+++ b/specification/scripts/generator.py
|
||||
@@ -516,9 +516,10 @@ class OutputGenerator:
|
||||
# Generator can be used without writing to a file.
|
||||
if self.genOpts.filename is not None:
|
||||
if sys.platform == 'win32':
|
||||
- directory = Path(self.genOpts.directory)
|
||||
+ directory = self.genOpts.directory
|
||||
if not os.path.exists(directory):
|
||||
os.makedirs(directory)
|
||||
- self.outFile = io.open(directory / self.genOpts.filename, 'w', encoding='utf-8')
|
||||
+ self.outFile = io.open(directory + '/' + self.genOpts.filename, 'w', encoding='utf-8')
|
||||
else:
|
||||
filename = self.genOpts.directory + '/' + self.genOpts.filename
|
7
ports/openxr-loader/CONTROL
Normal file
7
ports/openxr-loader/CONTROL
Normal file
@ -0,0 +1,7 @@
|
||||
Source: openxr-loader
|
||||
Version: 0.90.1
|
||||
Description: Khronos API for abstracting VR/MR/AR hardware
|
||||
|
||||
Feature: vulkan
|
||||
Description: Vulkan functionality for OpenXR
|
||||
Build-Depends: vulkan
|
78
ports/openxr-loader/portfile.cmake
Normal file
78
ports/openxr-loader/portfile.cmake
Normal file
@ -0,0 +1,78 @@
|
||||
if (VCPKG_TARGET_ARCHITECTURE MATCHES "^arm*")
|
||||
message(FATAL_ERROR "OpenXR does not support arm")
|
||||
endif()
|
||||
|
||||
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
# Due to UWP restricting the usage of static CRT OpenXR cannot be built.
|
||||
message(FATAL_ERROR "OpenXR does not support UWP")
|
||||
endif()
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO KhronosGroup/OpenXR-SDK
|
||||
REF release-0.90.1
|
||||
SHA512 99b16b52511fef740fa7a1e234213310a4490b8d7baf4d1e003b93cf4f37b28abf526f6ed2d1e27e9ee2b4949b1957f15c20d4e0f8d30687806fe782780697af
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
# embedded python uses ignores PYTHONPATH
|
||||
0001-fix-embedded-python-path.patch
|
||||
# Pkg-config is not available on the Vcpkg CI systems, don't depend on it for the xlib backend
|
||||
0002-fix-linux-pkgconfig-dependency.patch
|
||||
# Python < 3.6 doesn't allow a WindowsPath object to act as a pathlike in os.path functions
|
||||
0003-windows-path-python-fix.patch
|
||||
)
|
||||
|
||||
# Weird behavior inside the OpenXR loader. On Windows they force shared libraries to use static crt, and
|
||||
# vice-versa. Might be better in future iterations to patch the CMakeLists.txt for OpenXR
|
||||
if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
set(DYNAMIC_LOADER OFF)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
else()
|
||||
set(DYNAMIC_LOADER ON)
|
||||
set(VCPKG_CRT_LINKAGE static)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DBUILD_API_LAYERS=OFF
|
||||
-DBUILD_TESTS=OFF
|
||||
-DDYNAMIC_LOADER=${DYNAMIC_LOADER}
|
||||
-DPYTHON_EXECUTABLE=${PYTHON3}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
function(COPY_BINARIES SOURCE DEST)
|
||||
# hack, because CMAKE_SHARED_LIBRARY_SUFFIX seems to be unpopulated
|
||||
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
set(SHARED_LIB_SUFFIX ".dll")
|
||||
else()
|
||||
set(SHARED_LIB_SUFFIX ".so")
|
||||
endif()
|
||||
file(MAKE_DIRECTORY ${DEST})
|
||||
file(GLOB_RECURSE SHARED_BINARIES ${SOURCE}/*${SHARED_LIB_SUFFIX})
|
||||
file(COPY ${SHARED_BINARIES} DESTINATION ${DEST})
|
||||
file(REMOVE_RECURSE ${SHARED_BINARIES})
|
||||
endfunction()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
# No CMake files are contained in /share only docs
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openxr-loader RENAME copyright)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
COPY_BINARIES(${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/bin)
|
||||
COPY_BINARIES(${CURRENT_PACKAGES_DIR}/debug/lib ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
|
||||
vcpkg_copy_pdbs()
|
4
ports/otl/CONTROL
Normal file
4
ports/otl/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: otl
|
||||
Version: 4.0.442
|
||||
Description: Oracle, Odbc and DB2-CLI Template Library
|
||||
Homepage: http://otl.sourceforge.net/
|
17
ports/otl/portfile.cmake
Normal file
17
ports/otl/portfile.cmake
Normal file
@ -0,0 +1,17 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://otl.sourceforge.net/otlv4_h2.zip"
|
||||
FILENAME "otl-4.0.442.zip"
|
||||
SHA512 2f4005c2351021c92b86411e9c5847757b3596c485c34aa6a7228d86c446b0d9f1dcbfd228e9262d10c7460b77af0709b8ba9d5c7599ae54442efd88ccdbb96d
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
NO_REMOVE_ONE_LEVEL
|
||||
REF 4.0.422
|
||||
)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/otlv4.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/otl)
|
||||
file(INSTALL ${SOURCE_PATH}/otlv4.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/otl RENAME copyright)
|
4
ports/p-ranav-csv/CONTROL
Normal file
4
ports/p-ranav-csv/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: p-ranav-csv
|
||||
Version: 2019-07-11
|
||||
Description: CSV for modern C++
|
||||
Homepage: https://github.com/p-ranav/csv
|
25
ports/p-ranav-csv/portfile.cmake
Normal file
25
ports/p-ranav-csv/portfile.cmake
Normal file
@ -0,0 +1,25 @@
|
||||
# header-only library
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO p-ranav/csv
|
||||
REF 13e04e5b31b585855c7d7e7f3c65e47ae863569b
|
||||
SHA512 ddcdc7af68a0dabb2b7e15822f5900461b9f424ff5e0ac6cafd2454c2f21ca97785ef09ddb805a92e2452fe14c14167c762a822a8af6c5b86446f67e7f3f71bd
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DCSV_BUILD_TESTS=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
|
||||
|
||||
# Handle copyright
|
||||
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user