Commit c398b49c authored by Dr. Carsten Kemena's avatar Dr. Carsten Kemena
Browse files

CMake fixes

parent b52b516f
Pipeline #117102 failed with stages
in 1 minute and 6 seconds
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.14)
project (RADS LANGUAGES CXX VERSION 3.0.2)
project (RADS LANGUAGES CXX VERSION 3.0.3)
......@@ -100,14 +100,14 @@ SET(rads_src ${PROJECT_SOURCE_DIR}/src/rads.cpp ${PROJECT_SOURCE_DIR}/src/DBAcce
SET(rads_exe rads )
ADD_EXECUTABLE(${rads_exe} ${rads_src})
target_link_libraries(${rads_exe}
${Boost_LIBRARIES} ${SQLite3_LIBRARY} ${ZLIB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}
${Boost_LIBRARIES} ${SQLite3_LIBRARIES} ${ZLIB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}
)
SET(makeDB_src ${PROJECT_SOURCE_DIR}/src/makeRadsDB.cpp ${PROJECT_SOURCE_DIR}/src/external/SQLiteDB.cpp ${PROJECT_SOURCE_DIR}/src/DBCreator.cpp ${BSDL_src})
SET(makeDB_exe makeRadsDB)
ADD_EXECUTABLE(${makeDB_exe} ${makeDB_src})
target_link_libraries(${makeDB_exe}
${Boost_LIBRARIES} ${SQLite3_LIBRARY} ${ZLIB_LIBRARIES}
${Boost_LIBRARIES} ${SQLite3_LIBRARIES} ${ZLIB_LIBRARIES}
)
if (WITH_UNIT_TEST)
......
# - Try to find LibXml2
# Once done this will define
# LIBSQLITE3_FOUND - System has LibXml2
# LIBSQLITE3_INCLUDE_DIRS - The LibXml2 include directories
# LIBSQLITE3_LIBRARIES - The libraries needed to use LibXml2
# LIBSQLITE3_DEFINITIONS - Compiler switches required for using LibXml2
find_package(PkgConfig)
pkg_check_modules(PC_LIBXML QUIET sqlite3)
set(LIBSQLITE3_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})
find_path(LIBSQLITE3_INCLUDE_DIR sqlite3.h
HINTS ${PC_LIBXML_INCLUDEDIR} ${PC_LIBXML_INCLUDE_DIRS}
PATH_SUFFIXES libsqlite3 )
find_library(LIBSQLITE3_LIBRARY NAMES sqlite3 libsqlite3
HINTS ${PC_LIBXML_LIBDIR} ${PC_LIBXML_LIBRARY_DIRS} )
set(LIBSQLITE3_LIBRARIES ${LIBSQLITE3_LIBRARY} )
set(LIBSQLITE3_INCLUDE_DIRS ${LIBSQLITE3_INCLUDE_DIR} )
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBSQLITE3_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(Libsqlite3 DEFAULT_MSG
LIBSQLITE3_LIBRARY LIBSQLITE3_INCLUDE_DIR)
mark_as_advanced(LIBSQLITE3_INCLUDE_DIR LIBSQLITE3_LIBRARY )
\ No newline at end of file
# - Try to find SQLITE3
# Once done this will define
# SQLITE3_FOUND - System has LibXml2
# SQLITE3_INCLUDE_DIRS - The LibXml2 include directories
# SQLITE3_LIBRARIES - The libraries needed to use SQLITE3
# SQLITE3_DEFINITIONS - Compiler switches required for using SQLITE3
find_package(PkgConfig)
pkg_check_modules(PC_SQLITE3 QUIET sqlite3)
set(SQLITE3_DEFINITIONS ${PC_SQLITE3_CFLAGS_OTHER})
find_path(SQLITE3_INCLUDE_DIR sqlite3.h
HINTS ${PC_SQLITE3_INCLUDEDIR} ${PC_SQLITE3_INCLUDE_DIRS}
PATH_SUFFIXES sqlite3)
find_library(SQLITE3_LIBRARY NAMES sqlite3
HINTS ${PC_SQLITE3_LIBDIR} ${PC_SQLITE3_LIBRARY_DIRS} )
set(SQLITE3_LIBRARIES ${SQLITE3_LIBRARY} )
set(SQLITE3_INCLUDE_DIRS ${SQLITE3_INCLUDE_DIR} )
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set SQLITE3_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(SQLITE3 DEFAULT_MSG
SQLITE3_LIBRARY SQLITE3_INCLUDE_DIR)
mark_as_advanced(SQLITE3_INCLUDE_DIR SQLITE3_LIBRARY )
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment