2010-03-22 19:35:31 +01:00
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
|
|
|
|
# Source files
|
|
|
|
set(SQLITE-SOURCES
|
|
|
|
qsql_sqlite.cpp
|
|
|
|
smain.cpp
|
2010-04-13 21:43:08 +02:00
|
|
|
clementinesqlcachedresult.cpp
|
2010-03-22 19:35:31 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
# Header files that have Q_OBJECT in
|
|
|
|
set(SQLITE-MOC-HEADERS
|
|
|
|
qsql_sqlite.h
|
|
|
|
)
|
|
|
|
|
|
|
|
set(SQLITE-WIN32-RESOURCES qsqlite_resource.rc)
|
|
|
|
|
|
|
|
qt4_wrap_cpp(SQLITE-SOURCES-MOC ${SQLITE-MOC-HEADERS})
|
|
|
|
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
|
|
|
|
add_definitions(-DQT_PLUGIN -DQT_NO_DEBUG)
|
2010-06-20 17:44:52 +02:00
|
|
|
add_definitions(-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS)
|
2010-03-22 19:35:31 +01:00
|
|
|
|
2011-06-16 16:38:13 +02:00
|
|
|
add_library(sqlite STATIC sqlite3.c)
|
|
|
|
set_target_properties(sqlite PROPERTIES COMPILE_FLAGS
|
|
|
|
"-Wno-pointer-to-int-cast -Wno-int-to-pointer-cast")
|
|
|
|
|
2010-09-21 00:18:17 +02:00
|
|
|
add_library(qsqlite STATIC
|
2010-03-22 19:35:31 +01:00
|
|
|
${SQLITE-SOURCES}
|
|
|
|
${SQLITE-SOURCES-MOC}
|
|
|
|
${SQLITE-WIN32-RESOURCES}
|
|
|
|
)
|
|
|
|
target_link_libraries(qsqlite
|
2011-06-16 16:38:13 +02:00
|
|
|
sqlite
|
2010-03-22 19:35:31 +01:00
|
|
|
${QT_LIBRARIES}
|
|
|
|
)
|