[libharu] Fix DLLIMPORT macro replacement

This commit is contained in:
Robert Schumacher 2017-11-01 14:47:34 -07:00
parent fec804f236
commit 807a39c078
2 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
Source: libharu
Version: 2017-08-15-d84867ebf9f-3
Version: 2017-08-15-d84867ebf9f-4
Description: libharu - free PDF library
Build-Depends: zlib, libpng

View File

@ -37,17 +37,17 @@ file(REMOVE_RECURSE
file(READ "${CURRENT_PACKAGES_DIR}/include/hpdf.h" _contents)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
string(REPLACE "#ifdef HPDF_DLL" "#if 1" _contents "${_contents}")
string(REPLACE "#ifdef HPDF_DLL\n" "#if 1\n" _contents "${_contents}")
else()
string(REPLACE "#ifdef HPDF_DLL" "#if 0" _contents "${_contents}")
string(REPLACE "#ifdef HPDF_DLL\n" "#if 0\n" _contents "${_contents}")
endif()
file(WRITE "${CURRENT_PACKAGES_DIR}/include/hpdf.h" "${_contents}")
file(READ "${CURRENT_PACKAGES_DIR}/include/hpdf_types.h" _contents)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
string(REPLACE "#ifdef HPDF_DLL" "#if 1" _contents "${_contents}")
string(REPLACE "#ifdef HPDF_DLL\n" "#if 1\n" _contents "${_contents}")
else()
string(REPLACE "#ifdef HPDF_DLL" "#if 0" _contents "${_contents}")
string(REPLACE "#ifdef HPDF_DLL\n" "#if 0\n" _contents "${_contents}")
endif()
file(WRITE "${CURRENT_PACKAGES_DIR}/include/hpdf_types.h" "${_contents}")