diff options
| author | Vitaliy Parinov <v.v.parinov@gmail.com> | 2018-01-12 05:50:19 +0300 |
|---|---|---|
| committer | Vitaliy Parinov <v.v.parinov@gmail.com> | 2018-01-12 05:50:19 +0300 |
| commit | 60fb59ce4d0b205f06282b11768d0d04fde60eae (patch) | |
| tree | 313f13024cab5fcc7bf8f47194408deb87367972 | |
| parent | bfc50d8ee24f5a86b589d955a18d12a2c7d6343b (diff) | |
| download | vcpkg-60fb59ce4d0b205f06282b11768d0d04fde60eae.tar.gz vcpkg-60fb59ce4d0b205f06282b11768d0d04fde60eae.zip | |
[date] Update to 2.4 cont. (removed DATE_BUILD_LIB usages)
| -rw-r--r-- | ports/date/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | ports/date/portfile.cmake | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/ports/date/CMakeLists.txt b/ports/date/CMakeLists.txt index c1efc4e2a..4c38e4a87 100644 --- a/ports/date/CMakeLists.txt +++ b/ports/date/CMakeLists.txt @@ -14,8 +14,6 @@ add_library(tz src/tz.cpp) if(BUILD_SHARED_LIBS) target_compile_definitions(tz PRIVATE -DDATE_BUILD_DLL) -else() - target_compile_definitions(tz PRIVATE -DDATE_BUILD_LIB) endif() install( diff --git a/ports/date/portfile.cmake b/ports/date/portfile.cmake index 14bae6195..e060edb87 100644 --- a/ports/date/portfile.cmake +++ b/ports/date/portfile.cmake @@ -25,4 +25,11 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() +set(HEADER "${CURRENT_PACKAGES_DIR}/include/date/tz.h") +file(READ "${HEADER}" _contents) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + string(REPLACE "ifdef DATE_BUILD_DLL" "if 1" _contents "${_contents}") +endif() +file(WRITE "${HEADER}" "${_contents}") + file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/date RENAME copyright) |
