diff options
| author | Stefano Sinigardi <stesinigardi@hotmail.com> | 2019-06-01 00:48:17 +0200 |
|---|---|---|
| committer | Victor Romero <romerosanchezv@gmail.com> | 2019-05-31 15:48:17 -0700 |
| commit | 5898891125b00a3ec2b698bc496735ab997669f5 (patch) | |
| tree | ea6f52bc69dec26f7c88d6766234a7c507607a06 /ports/fmilib | |
| parent | 26a9338c5055193915290527eacb37f2ac7fdcb8 (diff) | |
| download | vcpkg-5898891125b00a3ec2b698bc496735ab997669f5.tar.gz vcpkg-5898891125b00a3ec2b698bc496735ab997669f5.zip | |
[openexr,openimageio,suitesparse,theia] updates for non-win32 (#6371)
* [openexr,openimageio,suitesparse,theia] updates for non-win32
* [theia] use only valid cmake symbols
* [suitesparse] Fix build
* [lapack] still not properly integrating with other ports
* [lapack] intercept cmake module calls and substitute them with our defs
* [suitesparse,clapack] fixes for proper integration
* [ceres,clapack] bump CONTROL
* [suitesparse] remove unnecessary defs
* [clapack] improve wrapper logic
* [WIN32] remove wrong symbol
* [clapack] fix wrapper integration
* [Accelerate] use best framework when available
* [clapack] separate config from wrapper
* [clapack] fix paths and filenames
* [mlpack,armadillo,clapack] improve library handling
* [mlpack] remove unnecessary cmake option
* [clp,coinutils,osi,liblemon] dependencies of openmvg, improve compatibility with non-win32
* [openmvg] fix for case-sensitive filesystems
* [clp,coinutils,osi] simplify CMakeLists removing many unnecessary steps
* [sophus] Force rebuild
* [theia] fixes for linux, part1
* [io2d] remove broken sintax
* [fontconfig] bump version to remove CI cached failure
* [theia] fixes for linux, part2
* [theia] remove unnecessary empty folders and comments from portfile
* [theia] use correct build type removing forced vars in cmakelists.txt
* [openmvg] add missing suitesparse target detection
* [sophus] fix Suitesparse dependency
* [sophus,openmvg] use suitesparse lowercase for module compatibility on case-sensitive filesystems
* [suitesparse] fixes for case-sensitive filesystems
* [openmvg] use correct Eigen3 name for case-sensitive filesystems
* [sophus] trigger rebuild
* [shogun] use modern vcpkg style
* [shogun] add missing cmake system processor symbol
Diffstat (limited to 'ports/fmilib')
| -rw-r--r-- | ports/fmilib/portfile.cmake | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/ports/fmilib/portfile.cmake b/ports/fmilib/portfile.cmake index 5692b7d12..46912d440 100644 --- a/ports/fmilib/portfile.cmake +++ b/ports/fmilib/portfile.cmake @@ -23,9 +23,9 @@ vcpkg_extract_source_archive(${ARCHIVE}) # Note that if you have configured and built both static and shared library on Windows
# but want to link with the static library compile time define "FMILIB_BUILDING_LIBRARY" must be set.
-if (WIN32 AND VCPKG_LIBRARY_LINKAGE STREQUAL static)
+if ((NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") AND VCPKG_LIBRARY_LINKAGE STREQUAL static)
SET(FMILIB_BUILDING_LIBRARY ON)
-else()
+else()
SET(FMILIB_BUILDING_LIBRARY OFF)
endif()
@@ -33,7 +33,7 @@ endif() # This is only used when generating Microsoft Visual Studio solutions. If the options is on then the library will
# be built against static runtime, otherwise - dynamic runtime (/MD or /MDd). Make sure the client code is using
# matching runtime
-if (WIN32 AND VCPKG_CRT_LINKAGE STREQUAL static)
+if ((NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") AND VCPKG_CRT_LINKAGE STREQUAL static)
SET(FMILIB_BUILD_WITH_STATIC_RTLIB ON)
else()
SET(FMILIB_BUILD_WITH_STATIC_RTLIB OFF)
@@ -42,9 +42,9 @@ endif() # On LINUX position independent code (-fPIC) must be used on all files to be linked into a shared library (.so file).
# On other systems this is not needed (either is default or relocation is done). Set this option to OFF if you
# are building an application on Linux and use static library only
-if (UNIX AND VCPKG_LIBRARY_LINKAGE STREQUAL static)
+if ((VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") AND VCPKG_LIBRARY_LINKAGE STREQUAL static)
SET(FMILIB_BUILD_FOR_SHARED_LIBS OFF)
-else()
+else()
SET(FMILIB_BUILD_FOR_SHARED_LIBS ON)
endif()
@@ -59,17 +59,17 @@ endif() SET(OPTIONS
-DFMILIB_BUILD_TESTS=OFF
- -DFMILIB_BUILD_STATIC_LIB=${FMILIB_BUILD_STATIC_LIB}
+ -DFMILIB_BUILD_STATIC_LIB=${FMILIB_BUILD_STATIC_LIB}
-DFMILIB_BUILD_SHARED_LIB=${FMILIB_BUILD_SHARED_LIB}
- -DFMILIB_BUILDING_LIBRARY=${FMILIB_BUILDING_LIBRARY}
- -DFMILIB_BUILD_WITH_STATIC_RTLIB=${FMILIB_BUILD_WITH_STATIC_RTLIB}
+ -DFMILIB_BUILDING_LIBRARY=${FMILIB_BUILDING_LIBRARY}
+ -DFMILIB_BUILD_WITH_STATIC_RTLIB=${FMILIB_BUILD_WITH_STATIC_RTLIB}
)
# Reset package dir
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR})
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR})
-if (WIN32)
+if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
if(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120")
set(GENERATOR "Visual Studio 12 2013")
@@ -109,30 +109,30 @@ foreach(BUILDTYPE "rel" "dbg") # Reset working dir
file(REMOVE_RECURSE ${BUILD_DIR})
- file(MAKE_DIRECTORY ${BUILD_DIR})
+ file(MAKE_DIRECTORY ${BUILD_DIR})
SET(FMILIB_INSTALL_PREFIX ${CURRENT_PACKAGES_DIR})
- if(WIN32)
+ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
SET(OPTIONS ${OPTIONS} -G ${GENERATOR})
- endif()
+ endif()
if(NOT RELEASE_BUILD)
STRING(APPEND FMILIB_INSTALL_PREFIX "/debug")
endif()
# Step 1: Configure
- vcpkg_execute_required_process(COMMAND
- cmake
+ vcpkg_execute_required_process(COMMAND
+ cmake
-DFMILIB_INSTALL_PREFIX=${FMILIB_INSTALL_PREFIX}
- -DFMILIB_DEFAULT_BUILD_TYPE_RELEASE=${RELEASE_BUILD}
+ -DFMILIB_DEFAULT_BUILD_TYPE_RELEASE=${RELEASE_BUILD}
${OPTIONS}
${SOURCE_PATH}
- WORKING_DIRECTORY
+ WORKING_DIRECTORY
${BUILD_DIR}
)
# Step 2: Build
# Custom build - becouse vcpkg_configure_cmake() + vcpkg_install_cmake() fails on Linux for some unknown reason
- if (UNIX)
+ if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
find_program(MAKE make)
if(NOT MAKE)
message(FATAL_ERROR "Could not find make. Please install it through your package manager.")
@@ -144,12 +144,12 @@ foreach(BUILDTYPE "rel" "dbg") else()
SET(CONFIG "Debug")
endif()
- vcpkg_execute_required_process(COMMAND
- cmake
- --build .
- --config ${CONFIG}
- --target "install"
- WORKING_DIRECTORY
+ vcpkg_execute_required_process(COMMAND
+ cmake
+ --build .
+ --config ${CONFIG}
+ --target "install"
+ WORKING_DIRECTORY
${BUILD_DIR}
)
endif()
@@ -159,9 +159,9 @@ foreach(BUILDTYPE "rel" "dbg") # remove /doc folder
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc)
- # Move .dll files (if any) from /lib to /bin
+ # Move .dll files (if any) from /lib to /bin
file(GLOB TMP ${CURRENT_PACKAGES_DIR}/lib/*.dll)
- if (TMP)
+ if (TMP)
file(COPY ${TMP} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
file(REMOVE ${TMP})
@@ -175,7 +175,7 @@ foreach(BUILDTYPE "rel" "dbg") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc)
- # Move .dll files (if any) from /lib to /bin
+ # Move .dll files (if any) from /lib to /bin
file(GLOB TMP ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll)
if (TMP)
file(COPY ${TMP} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
