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:
parent
2ce1a56c40
commit
e9fa25980b
@ -20,6 +20,7 @@ add_definitions(-D_CRT_HAS_CXX17=0)
|
|||||||
file(GLOB SOURCES_DOC LICENSE *.md)
|
file(GLOB SOURCES_DOC LICENSE *.md)
|
||||||
file(GLOB_RECURSE SOURCES_CONFIG config/*.h)
|
file(GLOB_RECURSE SOURCES_CONFIG config/*.h)
|
||||||
file(GLOB SOURCES_CONFIG_EXTERNAL_DLLEXPORT config/external/dllexport/*.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_EXTERNAL_STATIC config/external/static/*.h)
|
||||||
file(GLOB SOURCES_CONFIG_INTERNAL_BUNDLE config/internal/bundle/*.h)
|
file(GLOB SOURCES_CONFIG_INTERNAL_BUNDLE config/internal/bundle/*.h)
|
||||||
file(GLOB SOURCES_CONFIG_INTERNAL_DEFAULT config/internal/default/*.h)
|
file(GLOB SOURCES_CONFIG_INTERNAL_DEFAULT config/internal/default/*.h)
|
||||||
@ -84,8 +85,8 @@ endfunction()
|
|||||||
set(BUNDLE_DIST_TARGET "dist")
|
set(BUNDLE_DIST_TARGET "dist")
|
||||||
set(BUNDLE_DIST_HEADER "${DIST_DIR}/${LIB_NAME}.h")
|
set(BUNDLE_DIST_HEADER "${DIST_DIR}/${LIB_NAME}.h")
|
||||||
set(BUNDLE_DIST_SOURCE "${DIST_DIR}/${LIB_NAME}.c")
|
set(BUNDLE_DIST_SOURCE "${DIST_DIR}/${LIB_NAME}.c")
|
||||||
bundle_header(OUTPUT ${BUNDLE_DIST_HEADER} EXTERNAL_CONFIG static)
|
bundle_header(OUTPUT ${BUNDLE_DIST_HEADER} EXTERNAL_CONFIG bundle)
|
||||||
bundle_source(OUTPUT ${BUNDLE_DIST_SOURCE} EXTERNAL_CONFIG static)
|
bundle_source(OUTPUT ${BUNDLE_DIST_SOURCE} EXTERNAL_CONFIG bundle)
|
||||||
set_source_files_properties(
|
set_source_files_properties(
|
||||||
${BUNDLE_DIST_HEADER} ${BUNDLE_DIST_SOURCE}
|
${BUNDLE_DIST_HEADER} ${BUNDLE_DIST_SOURCE}
|
||||||
PROPERTIES GENERATED TRUE
|
PROPERTIES GENERATED TRUE
|
||||||
@ -93,7 +94,7 @@ set_source_files_properties(
|
|||||||
add_custom_target(
|
add_custom_target(
|
||||||
${BUNDLE_DIST_TARGET}
|
${BUNDLE_DIST_TARGET}
|
||||||
DEPENDS ${BUNDLE_DIST_SOURCE} ${BUNDLE_DIST_HEADER}
|
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}
|
${SOURCES_INCLUDE} ${SOURCES_SRC} ${SOURCES_DOC}
|
||||||
)
|
)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
|
|||||||
3
config/external/bundle/config-external.h
vendored
Normal file
3
config/external/bundle/config-external.h
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#ifndef WEPOLL_EXPORT
|
||||||
|
#define WEPOLL_EXPORT
|
||||||
|
#endif
|
||||||
Loading…
x
Reference in New Issue
Block a user