aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlecopivo <skrivantomas@seznam.cz>2018-07-04 16:12:51 +0200
committerRobert Schumacher <roschuma@microsoft.com>2018-07-04 07:12:51 -0700
commit7c4e262e5037b0b4a49775b65b2de55ed9b7b4af (patch)
tree0bf79dbc5383ba08bac08d1fa5dd369f6d8a3f4b
parent0c2d34331c5172a0a7a445537181cad13262e653 (diff)
downloadvcpkg-7c4e262e5037b0b4a49775b65b2de55ed9b7b4af.tar.gz
vcpkg-7c4e262e5037b0b4a49775b65b2de55ed9b7b4af.zip
Corrade and Magnum on Linux (#3611)
* Corrade and Magnum on Linux Removed ".exe" extension for executables on Linux. Removed default feature magnum[windowlesswglapplication] which works only on Windows. * Switched to CMAKE_EXECUTABLE_SUFFIX * [corrade] Remove use of CMAKE_EXECUTABLE_SUFFIX * [magnum] Avoid usages of CMAKE_EXECUTABLE_SUFFIX
-rw-r--r--ports/corrade/portfile.cmake22
-rw-r--r--ports/magnum/CONTROL2
-rw-r--r--ports/magnum/portfile.cmake20
3 files changed, 25 insertions, 19 deletions
diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake
index 9c407a753..dd676b592 100644
--- a/ports/corrade/portfile.cmake
+++ b/ports/corrade/portfile.cmake
@@ -7,11 +7,7 @@ vcpkg_from_github(
HEAD_REF master
)
-if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
- set(BUILD_STATIC 1)
-else()
- set(BUILD_STATIC 0)
-endif()
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
# Handle features
set(_COMPONENT_FLAGS "")
@@ -45,16 +41,20 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
# Install tools
if("utility" IN_LIST FEATURES)
+ file(GLOB EXES
+ ${CURRENT_PACKAGES_DIR}/bin/corrade-rc
+ ${CURRENT_PACKAGES_DIR}/bin/corrade-rc.exe
+ )
+
# Drop a copy of tools
- file(COPY ${CURRENT_PACKAGES_DIR}/bin/corrade-rc.exe
- DESTINATION ${CURRENT_PACKAGES_DIR}/tools/corrade)
+ file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/corrade)
# Tools require dlls
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/corrade)
- file(GLOB_RECURSE TO_REMOVE
- ${CURRENT_PACKAGES_DIR}/bin/*.exe
- ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
+ file(GLOB TO_REMOVE
+ ${CURRENT_PACKAGES_DIR}/bin/corrade-rc*
+ ${CURRENT_PACKAGES_DIR}/debug/bin/corrade-rc*)
file(REMOVE ${TO_REMOVE})
endif()
@@ -68,7 +68,7 @@ if(NOT FEATURES)
# debug is completely empty, as include and share
# have already been removed.
-elseif(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
# No dlls
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/bin
diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL
index c34339938..788e3e5e6 100644
--- a/ports/magnum/CONTROL
+++ b/ports/magnum/CONTROL
@@ -2,7 +2,7 @@ Source: magnum
Version: 2018.04-1
Build-Depends: corrade[pluginmanager], corrade[utility]
Description: C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/
-Default-Features: anyimageimporter, anyaudioimporter, anyimageconverter, anysceneimporter, debugtools, gl, meshtools, primitives, scenegraph, shaders, shapes, text, texturetools, trade, sdl2application, windowlesswglapplication
+Default-Features: anyimageimporter, anyaudioimporter, anyimageconverter, anysceneimporter, debugtools, gl, meshtools, primitives, scenegraph, shaders, shapes, text, texturetools, trade, sdl2application
Feature: al-info
Description: magnum-al-info utility
diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake
index e6b501e5a..cf17ae5fe 100644
--- a/ports/magnum/portfile.cmake
+++ b/ports/magnum/portfile.cmake
@@ -53,25 +53,31 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
# Drop a copy of tools
+if(NOT VCPKG_CMAKE_SYSTEM_NAME)
+ set(EXE_SUFFIX .exe)
+else()
+ set(EXE_SUFFIX)
+endif()
+
if(distancefieldconverter IN_LIST FEATURES)
- file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-distancefieldconverter.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum)
+ file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-distancefieldconverter${EXE_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum)
endif()
if(fontconverter IN_LIST FEATURES)
- file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-fontconverter.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum)
+ file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-fontconverter${EXE_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum)
endif()
if(al-info IN_LIST FEATURES)
- file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-al-info.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum)
+ file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-al-info${EXE_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum)
endif()
if(magnuminfo IN_LIST FEATURES)
- file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-info.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum)
+ file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-info${EXE_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum)
endif()
# Tools require dlls
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/magnum)
file(GLOB_RECURSE TO_REMOVE
- ${CURRENT_PACKAGES_DIR}/bin/*.exe
- ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
+ ${CURRENT_PACKAGES_DIR}/bin/*${EXE_SUFFIX}
+ ${CURRENT_PACKAGES_DIR}/debug/bin/*${EXE_SUFFIX})
if(TO_REMOVE)
file(REMOVE ${TO_REMOVE})
endif()
@@ -79,7 +85,7 @@ endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
-if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
# move plugin libs to conventional place