mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-27 04:27:11 +02:00
bin
module
vendor
ConcurrentQueue
Fmt
MaxmindDB
POCO
ApacheConnector
CppParser
CppUnit
Crypto
Data
MySQL
ODBC
PostgreSQL
SQLite
cmake
include
src
testsuite
CMakeLists.txt
Makefile
SQLite.progen
SQLite_VS90.sln
SQLite_VS90.vcproj
SQLite_vs140.sln
SQLite_vs140.vcxproj
SQLite_vs140.vcxproj.filters
SQLite_vs150.sln
SQLite_vs150.vcxproj
SQLite_vs150.vcxproj.filters
SQLite_vs160.sln
SQLite_vs160.vcxproj
SQLite_vs160.vcxproj.filters
dependencies
cmake
doc
include
samples
src
testsuite
CMakeLists.txt
Data.progen
Data_VS90.sln
Data_VS90.vcproj
Data_vs140.sln
Data_vs140.vcxproj
Data_vs140.vcxproj.filters
Data_vs150.sln
Data_vs150.vcxproj
Data_vs150.vcxproj.filters
Data_vs160.sln
Data_vs160.vcxproj
Data_vs160.vcxproj.filters
Makefile
dependencies
Encodings
Foundation
JSON
JWT
MongoDB
Net
NetSSL_OpenSSL
NetSSL_Win
PDF
PageCompiler
PocoDoc
ProGen
Redis
SevenZip
Util
XML
Zip
appveyor
build
cmake
contrib
doc
packaging
patches
release
travis
.gitattributes
.gitignore
.gitmodules
.travis.yml
CHANGELOG
CMakeLists.txt
CODE_OF_CONDUCT.md
CONTRIBUTING.md
CONTRIBUTORS
LICENSE
Makefile
NEWS
README
README.md
VERSION
appveyor.yml
build_cmake.cmd
build_cmake.sh
build_vs140.cmd
build_vs150.cmd
build_vs160.cmd
buildwin.cmd
buildwin.ps1
components
configure
cppignore.lnx
cppignore.win
env.bat
env.sh
libversion
SimpleIni
Squirrel
TinyDir
ZMQ
CMakeLists.txt
.gitignore
.gitmodules
CMakeLists.txt
LICENSE
README.md
Switched to POCO library for unified platform/library interface. Deprecated the external module API. It was creating more problems than solving. Removed most built-in libraries in favor of system libraries for easier maintenance. Cleaned and secured code with help from static analyzers.
72 lines
1.6 KiB
CMake
72 lines
1.6 KiB
CMake
# Sources
|
|
file(GLOB SRCS_G "src/*.cpp")
|
|
POCO_SOURCES_AUTO(SQLITE_SRCS ${SRCS_G})
|
|
|
|
# Headers
|
|
file(GLOB_RECURSE HDRS_G "include/*.h")
|
|
POCO_HEADERS_AUTO(SQLITE_SRCS ${HDRS_G})
|
|
|
|
if(POCO_UNBUNDLED)
|
|
find_package(SQLite3 REQUIRED)
|
|
else()
|
|
# sqlite3
|
|
POCO_SOURCES(SQLITE_SRCS sqlite3
|
|
src/sqlite3.c
|
|
)
|
|
|
|
POCO_HEADERS(SQLITE_SRCS sqlite3
|
|
src/sqlite3.h
|
|
)
|
|
endif()
|
|
|
|
# Version Resource
|
|
if(MSVC AND BUILD_SHARED_LIBS)
|
|
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
|
list(APPEND SQLITE_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
|
endif()
|
|
|
|
add_library(DataSQLite ${SQLITE_SRCS})
|
|
|
|
add_library(Poco::DataSQLite ALIAS DataSQLite)
|
|
set_target_properties(DataSQLite
|
|
PROPERTIES
|
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
|
OUTPUT_NAME PocoDataSQLite
|
|
DEFINE_SYMBOL SQLite_EXPORTS
|
|
)
|
|
target_link_libraries(DataSQLite PUBLIC Poco::Data)
|
|
target_include_directories(DataSQLite
|
|
PUBLIC
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
|
$<INSTALL_INTERFACE:include>
|
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
|
)
|
|
|
|
if(POCO_UNBUNDLED)
|
|
target_link_libraries(DataSQLite PUBLIC SQLite::SQLite3)
|
|
target_compile_definitions(DataSQLite PUBLIC
|
|
POCO_UNBUNDLED
|
|
SQLITE_THREADSAFE=1
|
|
)
|
|
else()
|
|
if(WINCE)
|
|
target_compile_definitions(DataSQLite PRIVATE SQLITE_MSVC_LOCALTIME_API)
|
|
endif(WINCE)
|
|
target_compile_definitions(DataSQLite PRIVATE
|
|
SQLITE_THREADSAFE=1
|
|
SQLITE_DISABLE_LFS
|
|
SQLITE_OMIT_UTF16
|
|
SQLITE_OMIT_PROGRESS_CALLBACK
|
|
SQLITE_OMIT_COMPLETE
|
|
SQLITE_OMIT_TCL_VARIABLE
|
|
SQLITE_OMIT_DEPRECATED
|
|
)
|
|
endif()
|
|
|
|
POCO_INSTALL(DataSQLite)
|
|
POCO_GENERATE_PACKAGE(DataSQLite)
|
|
|
|
if(ENABLE_TESTS)
|
|
add_subdirectory(testsuite)
|
|
endif()
|