Build Jansson if library not found

If the Jansson JSON library is not found on the system, it is built from
source.
This commit is contained in:
Markus Mäkelä
2017-01-27 07:28:57 +02:00
parent 89f456840c
commit 4adc9d705b
8 changed files with 32 additions and 6 deletions

View File

@ -17,7 +17,7 @@ if (JANSSON_FOUND)
storagefactory.cc
storagereal.cc
)
target_link_libraries(cache maxscale-common jansson)
target_link_libraries(cache maxscale-common ${JANSSON_LIBRARIES})
set_target_properties(cache PROPERTIES VERSION "1.0.0")
set_target_properties(cache PROPERTIES LINK_FLAGS -Wl,-z,defs)
install_module(cache core)

View File

@ -17,7 +17,7 @@ if (ROCKSDB_BUILT)
storage_rocksdb.cc
)
add_dependencies(storage_rocksdb RocksDB)
target_link_libraries(storage_rocksdb maxscale-common jansson ${ROCKSDB_LIB} ${ROCKSDB_LINK_LIBS})
target_link_libraries(storage_rocksdb maxscale-common ${JANSSON_LIBRARIES} ${ROCKSDB_LIB} ${ROCKSDB_LINK_LIBS})
set_target_properties(storage_rocksdb PROPERTIES VERSION "1.0.0")
set_target_properties(storage_rocksdb PROPERTIES LINK_FLAGS -Wl,-z,defs)
install_module(storage_rocksdb experimental)

View File

@ -10,7 +10,7 @@ add_library(cachetester
)
add_executable(testrules testrules.cc ../rules.cc)
target_link_libraries(testrules maxscale-common jansson)
target_link_libraries(testrules maxscale-common ${JANSSON_LIBRARIES})
add_executable(testkeygeneration
testkeygeneration.cc

View File

@ -6,7 +6,7 @@ if (JANSSON_FOUND)
maskingrules.cc
)
target_link_libraries(masking maxscale-common jansson)
target_link_libraries(masking maxscale-common ${JANSSON_LIBRARIES})
set_target_properties(masking PROPERTIES VERSION "1.0.0")
set_target_properties(masking PROPERTIES LINK_FLAGS -Wl,-z,defs)
install_module(masking core)

View File

@ -1,6 +1,6 @@
include_directories(..)
add_executable(masking_testrules testrules.cc ../maskingrules.cc)
target_link_libraries(masking_testrules maxscale-common jansson)
target_link_libraries(masking_testrules maxscale-common ${JANSSON_LIBRARIES})
add_test(TestMasking_rules masking_testrules)