config: re-enable overriding 'WEPOLL_EXPORT' when compiling bundle

This possibility got inadvertently removed in the big config refactor
(3ad20d7), which made building a shared library from the bundled source
distribution (as is done by e.g. vcpkg) impossible.
This commit is contained in:
Bert Belder 2020-05-26 18:51:52 +02:00
parent 2ce1a56c40
commit e9fa25980b
No known key found for this signature in database
GPG Key ID: 7A77887B2E2ED461
2 changed files with 7 additions and 3 deletions

View File

@ -20,6 +20,7 @@ add_definitions(-D_CRT_HAS_CXX17=0)
file(GLOB SOURCES_DOC LICENSE *.md)
file(GLOB_RECURSE SOURCES_CONFIG config/*.h)
file(GLOB SOURCES_CONFIG_EXTERNAL_DLLEXPORT config/external/dllexport/*.h)
file(GLOB SOURCES_CONFIG_EXTERNAL_BUNDLE config/external/bundle/*.h)
file(GLOB SOURCES_CONFIG_EXTERNAL_STATIC config/external/static/*.h)
file(GLOB SOURCES_CONFIG_INTERNAL_BUNDLE config/internal/bundle/*.h)
file(GLOB SOURCES_CONFIG_INTERNAL_DEFAULT config/internal/default/*.h)
@ -84,8 +85,8 @@ endfunction()
set(BUNDLE_DIST_TARGET "dist")
set(BUNDLE_DIST_HEADER "${DIST_DIR}/${LIB_NAME}.h")
set(BUNDLE_DIST_SOURCE "${DIST_DIR}/${LIB_NAME}.c")
bundle_header(OUTPUT ${BUNDLE_DIST_HEADER} EXTERNAL_CONFIG static)
bundle_source(OUTPUT ${BUNDLE_DIST_SOURCE} EXTERNAL_CONFIG static)
bundle_header(OUTPUT ${BUNDLE_DIST_HEADER} EXTERNAL_CONFIG bundle)
bundle_source(OUTPUT ${BUNDLE_DIST_SOURCE} EXTERNAL_CONFIG bundle)
set_source_files_properties(
${BUNDLE_DIST_HEADER} ${BUNDLE_DIST_SOURCE}
PROPERTIES GENERATED TRUE
@ -93,7 +94,7 @@ set_source_files_properties(
add_custom_target(
${BUNDLE_DIST_TARGET}
DEPENDS ${BUNDLE_DIST_SOURCE} ${BUNDLE_DIST_HEADER}
SOURCES ${SOURCES_CONFIG_EXTERNAL_STATIC} ${SOURCES_CONFIG_INTERNAL_BUNDLE}
SOURCES ${SOURCES_CONFIG_EXTERNAL_BUNDLE} ${SOURCES_CONFIG_INTERNAL_BUNDLE}
${SOURCES_INCLUDE} ${SOURCES_SRC} ${SOURCES_DOC}
)
add_custom_command(

View File

@ -0,0 +1,3 @@
#ifndef WEPOLL_EXPORT
#define WEPOLL_EXPORT
#endif