From 346c2bee991499ba6698545501e958608638b900 Mon Sep 17 00:00:00 2001 From: codicodi Date: Fri, 9 Jun 2017 00:55:17 +0200 Subject: [PATCH] [fltk] force import macro to either 0 or 1 --- ports/fltk/CONTROL | 2 +- ports/fltk/portfile.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ports/fltk/CONTROL b/ports/fltk/CONTROL index 2fdb2eecb7..2b4f00629d 100644 --- a/ports/fltk/CONTROL +++ b/ports/fltk/CONTROL @@ -1,4 +1,4 @@ Source: fltk -Version: 1.3.4-3 +Version: 1.3.4-4 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 ba9058316e..c6c6fd8304 100644 --- a/ports/fltk/portfile.cmake +++ b/ports/fltk/portfile.cmake @@ -28,6 +28,7 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DOPTION_BUILD_EXAMPLES=OFF -DOPTION_USE_SYSTEM_ZLIB=ON @@ -71,6 +72,16 @@ else() endforeach() endif() +foreach(FILE Fl_Export.H fl_utf8.h) + file(READ ${CURRENT_PACKAGES_DIR}/include/FL/${FILE} FLTK_HEADER) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + string(REPLACE "defined(FL_DLL)" "0" FLTK_HEADER "${FLTK_HEADER}") + else() + string(REPLACE "defined(FL_DLL)" "1" FLTK_HEADER "${FLTK_HEADER}") + endif() + file(WRITE ${CURRENT_PACKAGES_DIR}/include/FL/${FILE} "${FLTK_HEADER}") +endforeach() + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fltk