Fix dbfwfilter and cachetester dependencies

The two depended on the PCRE2 and Connector-C libraries which means that
the libraries need to be built first. This information needs to be told to
CMake with the add_dependency call.
This commit is contained in:
Markus Mäkelä
2017-11-05 19:24:56 +02:00
parent 43cea6a2fa
commit 0131841787
2 changed files with 7 additions and 0 deletions

View File

@ -9,6 +9,9 @@ add_library(cachetester
../../../../../query_classifier/test/testreader.cc
)
# Depends on C/C
add_dependencies(cachetester connector-c)
add_executable(testrules testrules.cc ../rules.cc)
target_link_libraries(testrules maxscale-common ${JANSSON_LIBRARIES})

View File

@ -7,6 +7,10 @@ if(BISON_FOUND AND FLEX_FOUND)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_library(dbfwfilter-core STATIC ${BISON_ruleparser_OUTPUTS} ${FLEX_token_OUTPUTS} rules.cc user.cc)
# Depends on PCRE2
add_dependencies(dbfwfilter-core pcre2 connector-c)
add_library(dbfwfilter SHARED dbfwfilter.cc)
target_link_libraries(dbfwfilter maxscale-common MySQLCommon dbfwfilter-core)
set_target_properties(dbfwfilter PROPERTIES VERSION "1.0.0")