[SObjectizer] Patch static/dynamic linkage flags

This commit is contained in:
sigman 2017-06-29 20:07:00 +03:00
parent b68967891e
commit 61d9cf34cd
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,3 @@
Source: sobjectizer
Version: 5.5.19
Version: 5.5.19-2
Description: SObjectizer is a C++ in-process message dispatching framework with implementation of Actor Model, Publish-Subscribe Model and CSP-like channels.

View File

@ -36,6 +36,16 @@ vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# patch SO_5_STATIC_LIB in headers with actual value
set(DECLSPEC_FILE ${CURRENT_PACKAGES_DIR}/include/so_5/h/declspec.hpp)
file(READ ${DECLSPEC_FILE} DECLSPEC_H)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
string(REPLACE "defined( SO_5_STATIC_LIB )" "1" DECLSPEC_H "${DECLSPEC_H}")
else()
string(REPLACE "defined( SO_5_STATIC_LIB )" "0" DECLSPEC_H "${DECLSPEC_H}")
endif()
file(WRITE ${DECLSPEC_FILE} "${DECLSPEC_H}")
# Handle copyright
file(COPY ${SOURCE_PATH}/../LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sobjectizer)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/sobjectizer/LICENSE ${CURRENT_PACKAGES_DIR}/share/sobjectizer/copyright)