mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
[duktape] Revert duk_config.h to its original state
This commit is contained in:
parent
8c9744fa14
commit
73ed70bb33
@ -8,11 +8,13 @@ vcpkg_download_distfile(ARCHIVE_FILE
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
|
||||
# Patch duk_config.h to remove 'undef DUK_F_DLL_BUILD'
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES "${CMAKE_CURRENT_LIST_DIR}/duk_config.h.patch"
|
||||
)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
# Patch duk_config.h to remove 'undef DUK_F_DLL_BUILD'
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES "${CMAKE_CURRENT_LIST_DIR}/duk_config.h.patch"
|
||||
)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${CMAKE_PATH}
|
||||
@ -21,6 +23,13 @@ vcpkg_configure_cmake(
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
# Revert duk_config.h to its original state
|
||||
# This is always done in case the file has already been previously patched
|
||||
set(DUK_CONFIG_H_PATH "${CURRENT_PACKAGES_DIR}/include/duk_config.h")
|
||||
file(READ ${DUK_CONFIG_H_PATH} CONTENT)
|
||||
string(REPLACE "// #undef DUK_F_DLL_BUILD" "#undef DUK_F_DLL_BUILD" CONTENT "${CONTENT}")
|
||||
file(WRITE ${DUK_CONFIG_H_PATH} "${CONTENT}")
|
||||
|
||||
# Remove debug include
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user