Fixed PCRE2 beng built when CMake is configured
The bundled PCRE2 library will be built as a separate target and configuring CMake no longer builds it. Instead, it will only be built when it is out of date. This requires all targets to declare that they depend on the pcre2 target in order for it to be built.
This commit is contained in:
@ -6,6 +6,7 @@ if(BUILD_TESTS OR BUILD_TOOLS)
|
||||
target_link_libraries(fullcore ${TCMALLOC_LIBRARIES})
|
||||
endif()
|
||||
target_link_libraries(fullcore ${CURL_LIBRARIES} utils log_manager pthread ${EMBEDDED_LIB} ${PCRE_LINK_FLAGS} ssl aio rt crypt dl crypto inih z m stdc++)
|
||||
add_dependencies(fullcore pcre2)
|
||||
endif()
|
||||
|
||||
add_executable(maxscale atomic.c buffer.c spinlock.c gateway.c
|
||||
@ -13,6 +14,7 @@ add_executable(maxscale atomic.c buffer.c spinlock.c gateway.c
|
||||
poll.c config.c users.c hashtable.c dbusers.c thread.c gwbitmask.c
|
||||
monitor.c adminusers.c secrets.c filter.c modutil.c hint.c
|
||||
housekeeper.c memlog.c resultset.c gwdirs.c externcmd.c random_jkiss.c maxscale_pcre2.c)
|
||||
add_dependencies(maxscale pcre2)
|
||||
|
||||
if(WITH_JEMALLOC)
|
||||
target_link_libraries(maxscale ${JEMALLOC_LIBRARIES})
|
||||
|
@ -8,6 +8,7 @@ endif()
|
||||
|
||||
add_library(regexfilter SHARED regexfilter.c)
|
||||
target_link_libraries(regexfilter log_manager ${PCRE2_LIBRARIES})
|
||||
add_dependencies(regexfilter pcre2)
|
||||
install(TARGETS regexfilter DESTINATION ${MAXSCALE_LIBDIR})
|
||||
|
||||
add_library(testfilter SHARED testfilter.c)
|
||||
|
@ -1,16 +1,21 @@
|
||||
add_library(mysqlmon SHARED mysql_mon.c monitor_common.c)
|
||||
target_link_libraries(mysqlmon log_manager)
|
||||
add_dependencies(mysqlmon pcre2)
|
||||
install(TARGETS mysqlmon DESTINATION ${MAXSCALE_LIBDIR})
|
||||
|
||||
add_library(galeramon SHARED galeramon.c monitor_common.c)
|
||||
target_link_libraries(galeramon log_manager)
|
||||
add_dependencies(galeramon pcre2)
|
||||
install(TARGETS galeramon DESTINATION ${MAXSCALE_LIBDIR})
|
||||
|
||||
add_library(ndbclustermon SHARED ndbclustermon.c monitor_common.c)
|
||||
target_link_libraries(ndbclustermon log_manager)
|
||||
add_dependencies(ndbclustermon pcre2)
|
||||
install(TARGETS ndbclustermon DESTINATION ${MAXSCALE_LIBDIR})
|
||||
|
||||
if(BUILD_MMMON)
|
||||
add_library(mmmon SHARED mmmon.c monitor_common.c)
|
||||
target_link_libraries(mmmon log_manager)
|
||||
add_dependencies(mmmon pcre2)
|
||||
install(TARGETS mmmon DESTINATION ${MAXSCALE_LIBDIR})
|
||||
endif()
|
||||
|
@ -1,9 +1,11 @@
|
||||
add_library(schemarouter SHARED schemarouter.c sharding_common.c)
|
||||
target_link_libraries(schemarouter log_manager query_classifier)
|
||||
add_dependencies(schemarouter pcre2)
|
||||
install(TARGETS schemarouter DESTINATION ${MAXSCALE_LIBDIR})
|
||||
|
||||
add_library(shardrouter SHARED shardrouter.c svcconn.c sharding_common.c)
|
||||
target_link_libraries(shardrouter log_manager query_classifier)
|
||||
add_dependencies(shardrouter pcre2)
|
||||
install(TARGETS shardrouter DESTINATION ${MAXSCALE_LIBDIR})
|
||||
|
||||
if(BUILD_TESTS)
|
||||
|
Reference in New Issue
Block a user