From c06cc40d27e5cb83424d89cb19571eb42392abe6 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 29 Oct 2016 14:24:45 -0400 Subject: Add sqlite amalgamation and use if no system sqlite is found. Move sqlite module out of extras. --- src/tools/CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt index ee445a00e..76442b4ab 100644 --- a/src/tools/CMakeLists.txt +++ b/src/tools/CMakeLists.txt @@ -1,11 +1,17 @@ +if(PREFER_EMBEDDED_SQLITE OR NOT SQLITE_FOUND) + include_directories(${Anope_SOURCE_DIR}/lib/sqlite) +endif() function(build_sqlite LIBNAME) add_library(tools_anope_sqlite_${LIBNAME} SHARED anope_sqlite.cpp) + if(PREFER_EMBEDDED_SQLITE OR NOT SQLITE_FOUND) + target_link_libraries(tools_anope_sqlite_${LIBNAME} sqlite3) + else() + target_link_libraries(tools_anope_sqlite_${LIBNAME} ${SQLITE_LIBRARIES}) + endif() set_source_files_properties(anope_sqlite.cpp PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}") set_target_properties(tools_anope_sqlite_${LIBNAME} PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}" OUTPUT_NAME "anope_sqlite_${LIBNAME}") - install(TARGETS tools_anope_sqlite_${LIBNAME} - DESTINATION ${LIB_DIR} - ) + install(TARGETS tools_anope_sqlite_${LIBNAME} DESTINATION ${LIB_DIR}) endfunction() build_sqlite(ascii) -- cgit