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,4 +1,5 @@
|
|||
#include "ArrayParser.h"
|
||||
#include <cstring>
|
||||
#include <stdexcept>
|
||||
|
||||
using namespace Pgsql;
|
||||
|
|
|
|||
48
pgsql/CMakeLists.txt
Normal file
48
pgsql/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
find_package(PostgreSQL REQUIRED)
|
||||
|
||||
add_library(pgsql STATIC
|
||||
Pgsql_Connection.cpp
|
||||
Pgsql_Params.cpp
|
||||
Pgsql_PgException.cpp
|
||||
Pgsql_Result.cpp
|
||||
Pgsql_Row.cpp
|
||||
Pgsql_Value.cpp
|
||||
ArrayParser.cpp
|
||||
Pgsql_oids.cpp
|
||||
Pgsql_Transaction.cpp
|
||||
Pgsql_ErrorDetails.cpp
|
||||
Pgsql_Canceller.cpp
|
||||
Pgsql_Connection.h
|
||||
Pgsql_IResult.h
|
||||
Pgsql_Params.h
|
||||
Pgsql_PgException.h
|
||||
Pgsql_Result.h
|
||||
Pgsql_ResultConstIterator.h
|
||||
Pgsql_Row.h
|
||||
Pgsql_Value.h
|
||||
Pgsql_declare.h
|
||||
Pgsql_Col.h
|
||||
ArrayParser.h
|
||||
Pgsql_oids.h
|
||||
SqlGenerator.h
|
||||
Pgsql_Transaction.h
|
||||
Pgsql_ErrorDetails.h
|
||||
Pgsql_Canceller.h
|
||||
)
|
||||
|
||||
target_link_libraries(pgsql PUBLIC
|
||||
core
|
||||
PostgreSQL::PostgreSQL
|
||||
Qt6::Core
|
||||
Qt6::Widgets
|
||||
)
|
||||
|
||||
target_include_directories(pgsql PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
)
|
||||
|
||||
set_target_properties(pgsql PROPERTIES
|
||||
CXX_STANDARD 20
|
||||
CXX_STANDARD_REQUIRED ON
|
||||
POSITION_INDEPENDENT_CODE ON
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue