Repository navigation
windows下,qt15, cmake工程,mingw64 15.2 成功把ormpp集成到自己的工程 #257
chufreud
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Cmakelists.txt 添加
find_package(SQLite3 REQUIRED) # 新增:查找 SQLite3 库
set(ENABLE_SQLITE3 ON)
add_definitions(-DORMPP_ENABLE_SQLITE3)
target_include_directories(${Project_Name} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/path/to/ormpp # 包含 iguana/
${CMAKE_CURRENT_SOURCE_DIR}/path/to/ormpp/ormpp # 包含 sqlite.hpp 等
)
target_link_libraries(${Project_Name} PRIVATE
Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Quick
SQLite::SQLite3 # 关键:链接 SQLite 库
)
All reactions