[fltk] force import macro to either 0 or 1

This commit is contained in:
codicodi 2017-06-09 00:55:17 +02:00
parent a24dacfc97
commit 346c2bee99
2 changed files with 12 additions and 1 deletions

View File

@ -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

View File

@ -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