Switch to cmake + vcpkg, builds on linux, windows needs verification.
Code has been modified to be portable.
This commit is contained in:
parent
c1a5ac1aad
commit
49f6619a4e
34 changed files with 678 additions and 327 deletions
|
|
@ -1,41 +1,31 @@
|
|||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
add_library(core STATIC
|
||||
BackupFormatModel.cpp
|
||||
CsvWriter.cpp
|
||||
my_boost_assert_handler.cpp
|
||||
PasswordManager.cpp
|
||||
SqlLexer.cpp)
|
||||
|
||||
SqlLexer.cpp
|
||||
CsvWriter.cpp
|
||||
BackupFormatModel.cpp
|
||||
ExplainTreeModelItem.cpp
|
||||
jsoncpp.cpp
|
||||
SqlLexer.h
|
||||
ScopeGuard.h
|
||||
CsvWriter.h
|
||||
BackupFormatModel.h
|
||||
Expected.h
|
||||
ExplainTreeModelItem.h
|
||||
json/json.h
|
||||
std_utils.h
|
||||
IntegerRange.h
|
||||
)
|
||||
|
||||
target_link_libraries(core PUBLIC
|
||||
boost
|
||||
botan
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
target_include_directories(core INTERFACE
|
||||
|
||||
target_include_directories(core PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
)
|
||||
)
|
||||
|
||||
set_target_properties(core PROPERTIES
|
||||
CXX_STANDARD 14
|
||||
set_target_properties(core PROPERTIES
|
||||
CXX_STANDARD 20
|
||||
CXX_STANDARD_REQUIRED ON
|
||||
POSITION_INDEPENDENT_CODE True
|
||||
POSITION_INDEPENDENT_CODE ON
|
||||
)
|
||||
|
||||
add_executable(runtests
|
||||
test/main.cpp
|
||||
test/tst_CsvWriter.cpp
|
||||
test/tst_expected.cpp
|
||||
test/tst_PasswordManager.cpp
|
||||
test/tst_scopeguard.cpp
|
||||
test/tst_SqlLexer.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(runtests
|
||||
core
|
||||
gtest
|
||||
Threads::Threads
|
||||
)
|
||||
|
||||
add_test(tests runtests)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue