aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-05-23 01:11:52 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-05-23 01:11:52 -0700
commit1780157dbc64bf568fe0f9653b585f519ab1a019 (patch)
treef68328308d82fdd9dfd45c54623f052e72672530
parent21e30e6d802e3ab3b985cb9b4bde0fa5adef432d (diff)
downloadvcpkg-1780157dbc64bf568fe0f9653b585f519ab1a019.tar.gz
vcpkg-1780157dbc64bf568fe0f9653b585f519ab1a019.zip
[fltk] Place fluid.exe into tools/fltk. Remove static import libs in shared builds.
-rw-r--r--ports/fltk/CONTROL2
-rw-r--r--ports/fltk/portfile.cmake32
2 files changed, 20 insertions, 14 deletions
diff --git a/ports/fltk/CONTROL b/ports/fltk/CONTROL
index 985c6b1c0..2fdb2eecb 100644
--- a/ports/fltk/CONTROL
+++ b/ports/fltk/CONTROL
@@ -1,4 +1,4 @@
Source: fltk
-Version: 1.3.4-2
+Version: 1.3.4-3
Description: FLTK (pronounced fulltick) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL and its built-in GLUT emulation.
Build-Depends: zlib, libpng, libjpeg-turbo \ No newline at end of file
diff --git a/ports/fltk/portfile.cmake b/ports/fltk/portfile.cmake
index aca489e3f..ba9058316 100644
--- a/ports/fltk/portfile.cmake
+++ b/ports/fltk/portfile.cmake
@@ -28,8 +28,11 @@ endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
- OPTIONS
+ OPTIONS
-DOPTION_BUILD_EXAMPLES=OFF
+ -DOPTION_USE_SYSTEM_ZLIB=ON
+ -DOPTION_USE_SYSTEM_LIBPNG=ON
+ -DOPTION_USE_SYSTEM_LIBJPEG=ON
-DOPTION_BUILD_SHARED_LIBS=${BUILD_SHARED}
)
@@ -41,30 +44,33 @@ file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/include
)
-file(COPY ${CURRENT_PACKAGES_DIR}/bin/fluid.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
+file(COPY ${CURRENT_PACKAGES_DIR}/bin/fluid.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/fltk)
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/fluid.exe)
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/fltk-config)
-file(COPY ${CURRENT_PACKAGES_DIR}/debug/bin/fluid.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/debug)
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/fluid.exe)
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/fltk-config)
vcpkg_copy_pdbs()
-if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/fltk)
-
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/debug/bin
+ ${CURRENT_PACKAGES_DIR}/bin
+ )
else()
- file(REMOVE_RECURSE
- ${CURRENT_PACKAGES_DIR}/debug/bin
- ${CURRENT_PACKAGES_DIR}/bin
- )
-
-
+ file(GLOB SHARED_LIBS "${CURRENT_PACKAGES_DIR}/lib/*_SHARED.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/*_SHAREDd.lib")
+ file(GLOB STATIC_LIBS "${CURRENT_PACKAGES_DIR}/lib/*.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/*.lib")
+ list(FILTER STATIC_LIBS EXCLUDE REGEX "_SHAREDd?\\.lib\$")
+ file(REMOVE ${STATIC_LIBS})
+ foreach(SHARED_LIB ${SHARED_LIBS})
+ string(REGEX REPLACE "_SHARED(d?)\\.lib\$" "\\1.lib" NEWNAME ${SHARED_LIB})
+ file(RENAME ${SHARED_LIB} ${NEWNAME})
+ endforeach()
endif()
-
-
file(INSTALL
${SOURCE_PATH}/COPYING
DESTINATION ${CURRENT_PACKAGES_DIR}/share/fltk