Skip to content

Commit

Permalink
Not clearing SQL_LIBRARIES so that more libraries can be specified by…
Browse files Browse the repository at this point in the history
… command line.
  • Loading branch information
bingmann committed Jun 2, 2014
1 parent e82ff35 commit f16b320
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall")
# enable use of "make test"
enable_testing()

# Find SQL libraries
set(SQL_LIBRARIES "")
### Find SQL libraries ###

# Find PostgreSQL client library

Expand All @@ -70,7 +69,7 @@ if(WITH_POSTGRESQL)
find_package(PostgreSQL)

if(PostgreSQL_FOUND)
set(SQL_LIBRARIES ${SQL_LIBRARIES} ${PostgreSQL_LIBRARIES})
set(SQL_LIBRARIES ${PostgreSQL_LIBRARIES} ${SQL_LIBRARIES})
add_definitions(-DHAVE_POSTGRESQL=1)
message(STATUS "Found PostgreSQL: ${PostgreSQL_LIBRARIES}")
include_directories(${PostgreSQL_INCLUDE_DIRS})
Expand All @@ -93,7 +92,7 @@ if(WITH_MYSQL)
add_definitions(-DHAVE_MYSQL=1)
message(STATUS "Found MySQL: ${MYSQL_LIBRARIES}")
include_directories(${MYSQL_INCLUDE_DIRS})
set(SQL_LIBRARIES ${SQL_LIBRARIES} ${MYSQL_LIBRARIES})
set(SQL_LIBRARIES ${MYSQL_LIBRARIES} ${SQL_LIBRARIES})
else()
set(MYSQL_FOUND FALSE)
message(STATUS "Could NOT find MySQL library")
Expand All @@ -114,7 +113,7 @@ if(SQLITE3_INCLUDE_DIRS AND SQLITE3_LIBRARIES)
add_definitions(-DHAVE_SQLITE3=1)
message(STATUS "Found SQLite3: ${SQLITE3_LIBRARIES}")
include_directories(${SQLITE3_INCLUDE_DIRS})
set(SQL_LIBRARIES ${SQL_LIBRARIES} ${SQLITE3_LIBRARIES})
set(SQL_LIBRARIES ${SQLITE3_LIBRARIES} ${SQL_LIBRARIES})
else()
set(SQLITE3_FOUND FALSE)
message(SEND_ERROR "Could NOT find SQLite3 library. It is required!")
Expand Down

0 comments on commit f16b320

Please sign in to comment.