Commit 3bdbfbf2 authored by Steven Murray's avatar Steven Murray
Browse files

Fixed sqlite linking problems caused by new Findsqlite.cmake

parent f14b25f9
......@@ -35,6 +35,8 @@ set (CATALOGUE_UNIT_TESTS_LIB_SRC_FILES
add_library (ctacatalogueunittests SHARED
${CATALOGUE_UNIT_TESTS_LIB_SRC_FILES})
target_link_libraries (ctacatalogueunittests ctacatalogue)
target_link_libraries (ctacatalogueunittests
ctacatalogue
${SQLITE_LIBRARIES})
install(TARGETS ctacatalogueunittests DESTINATION usr/${CMAKE_INSTALL_LIBDIR})
......@@ -17,12 +17,18 @@
# This module will set the following variables:
# SQLITE_FOUND
# SQLITE_INCLUDE_DIRS
# SQLITE_LIBRARIES
find_path (SQLITE_INCLUDE_DIRS
find_path(SQLITE_INCLUDE_DIRS
sqlite3.h
PATHS /usr/include
NO_DEFAULT_PATH)
find_library(SQLITE_LIBRARIES
NAME sqlite3
PATHS /usr/lib64
NO_DEFAULT_PATH)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(sqlite DEFAULT_MSG
SQLITE_INCLUDE_DIRS)
SQLITE_INCLUDE_DIRS SQLITE_LIBRARIES)
cmake_minimum_required (VERSION 2.6)
find_package (sqlite REQUIRED)
include_directories (${SQLITE3_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
include_directories (${CMAKE_CURRENT_SOURCE_DIR}
${PROJECT_SOURCE_DIR} ${CMAKE_BINARY_DIR})
set (CTA_SCHEDULER_SRC_FILES
......@@ -14,8 +13,6 @@ set (CTA_SCHEDULER_SRC_FILES
LogicalLibrary.cpp
# mockDB/MockSchedulerDatabase.cpp
# mockDB/MockSchedulerDatabaseFactory.cpp
# mockDB/SqliteColumnNameToIndex.cpp
# mockDB/SQLiteStatementDeleter.cpp
MountType.cpp
PositioningMethod.cpp
RetrieveJob.cpp
......@@ -25,8 +22,6 @@ set (CTA_SCHEDULER_SRC_FILES
Scheduler.cpp
SchedulerDatabase.cpp
SchedulerDatabaseFactory.cpp
# mockDB/SqliteColumnNameToIndex.cpp
# mockDB/SQLiteStatementDeleter.cpp
MountType.cpp
UserRequest.cpp
OStoreDB/OStoreDB.cpp
......@@ -36,7 +31,7 @@ add_library (ctascheduler SHARED
${CTA_SCHEDULER_SRC_FILES})
install (TARGETS ctascheduler DESTINATION usr/${CMAKE_INSTALL_LIBDIR})
target_link_libraries (ctascheduler ${SQLITE3_LIBRARY_RELEASE} ctacommon ctaobjectstore protobuf Utils ctautils)
target_link_libraries (ctascheduler ctacommon ctaobjectstore protobuf Utils ctautils)
#add_library (ctaschedulerutils SHARED
# _old_prototype_DummyScheduler.cpp)
......@@ -48,7 +43,6 @@ add_library (ctaschedulerunittests SHARED
SchedulerDatabaseTest.cpp)
target_link_libraries (ctaschedulerunittests
${SQLITE3_LIBRARY_RELEASE}
ctascheduler)
install(TARGETS ctaschedulerunittests DESTINATION usr/${CMAKE_INSTALL_LIBDIR})
\ No newline at end of file
install(TARGETS ctaschedulerunittests DESTINATION usr/${CMAKE_INSTALL_LIBDIR})
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