cmake: Make some libraries depend on the generated files from database lib

This commit is contained in:
louiz’
2017-03-15 18:31:59 +01:00
parent 7c036d0593
commit 2d50fec964
+5
View File
@@ -153,14 +153,17 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}/")
file(GLOB source_utils file(GLOB source_utils
src/utils/*.[hc]pp) src/utils/*.[hc]pp)
add_library(utils OBJECT ${source_utils}) add_library(utils OBJECT ${source_utils})
add_dependencies(utils database)
file(GLOB source_irc file(GLOB source_irc
src/irc/*.[hc]pp) src/irc/*.[hc]pp)
add_library(irc OBJECT ${source_irc}) add_library(irc OBJECT ${source_irc})
add_dependencies(irc database)
file(GLOB source_xmpp file(GLOB source_xmpp
src/xmpp/*.[hc]pp) src/xmpp/*.[hc]pp)
add_library(xmpp OBJECT ${source_xmpp}) add_library(xmpp OBJECT ${source_xmpp})
add_dependencies(xmpp database)
file(GLOB source_identd file(GLOB source_identd
src/identd/*.[hc]pp) src/identd/*.[hc]pp)
@@ -169,6 +172,7 @@ add_library(identd OBJECT ${source_identd})
file(GLOB source_bridge file(GLOB source_bridge
src/bridge/*.[hc]pp) src/bridge/*.[hc]pp)
add_library(bridge OBJECT ${source_bridge}) add_library(bridge OBJECT ${source_bridge})
add_dependencies(bridge database)
file(GLOB source_config file(GLOB source_config
src/config/*.[hc]pp) src/config/*.[hc]pp)
@@ -181,6 +185,7 @@ add_library(logger OBJECT ${source_logger})
file(GLOB source_network file(GLOB source_network
src/network/*.[hc]pp) src/network/*.[hc]pp)
add_library(network OBJECT ${source_network}) add_library(network OBJECT ${source_network})
add_dependencies(network database)
if(LITESQL_FOUND) if(LITESQL_FOUND)
LITESQL_GENERATE_CPP("database/database.xml" LITESQL_GENERATE_CPP("database/database.xml"