diff options
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6e96cb35..192d1e50 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -19,23 +19,26 @@ SET(FLAGS "${FLAGS} -DLOCALEDIR=\\\"${LOCALEDIR}/\\\"") # If the Sqlite option is enabled... IF (WITH_SQLITE) - FIND_PACKAGE(Sqlite REQUIRED) - INCLUDE_DIRECTORIES(${SQLITE_INCLUDE_DIR}) - SET(FLAGS "${FLAGS} -DBUILD_SQLITE") + FIND_PACKAGE(Sqlite3 REQUIRED) + INCLUDE_DIRECTORIES(${SQLITE3_INCLUDE_DIR}) + SET(FLAGS "${FLAGS} -DSQLITE_SUPPORT") + SET(OPTIONAL_LIBRARIES ${OPTIONAL_LIBRARIES} ${SQLITE3_LIBRARIES}) ENDIF(WITH_SQLITE) # If the MySQL option is enabled... IF (WITH_MYSQL) FIND_PACKAGE(MySQL REQUIRED) INCLUDE_DIRECTORIES(${MYSQL_INCLUDE_DIR}) - SET(FLAGS "${FLAGS} -DBUILD_MYSQL") + SET(FLAGS "${FLAGS} -DMYSQL_SUPPORT") + SET(OPTIONAL_LIBRARIES ${OPTIONAL_LIBRARIES} ${MYSQL_LIBRARIES}) ENDIF() # If the postgreSQL option is enabled... IF (WITH_POSTGRESQL) FIND_PACKAGE(PostgreSQL REQUIRED) INCLUDE_DIRECTORIES(${POSTGRESQL_INCLUDE_DIR}) - SET(FLAGS "${FLAGS} -DBUILD_POSTGRESQL") + SET(FLAGS "${FLAGS} -DPOSTGRESQL_SUPPORT") + SET(OPTIONAL_LIBRARIES ${OPTIONAL_LIBRARIES} ${POSTGRESQL_LIBRARIES}) ENDIF() # If the Lua scripting language support is enabled... @@ -43,6 +46,7 @@ IF (ENABLE_LUA) FIND_PACKAGE(Lua51 REQUIRED) INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR}) SET(FLAGS "${FLAGS} -DBUILD_LUA") + SET(OPTIONAL_LIBRARIES ${OPTIONAL_LIBRARIES} ${LUA_LIBRARIES}) ENDIF() IF (CMAKE_BUILD_TYPE) @@ -267,6 +271,7 @@ FOREACH(program ${PROGRAMS}) TARGET_LINK_LIBRARIES(${program} ${ENET_LIBRARIES} ${PHYSFS_LIBRARY} ${LIBXML2_LIBRARIES} + ${OPTIONAL_LIBRARIES} ${EXTRA_LIBRARIES}) INSTALL(TARGETS ${program} RUNTIME DESTINATION ${PKG_BINDIR}) ENDFOREACH(program) |