Commit 425d00bc authored by jan.koester's avatar jan.koester
Browse files

test

parent 5e192641
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -9,6 +9,12 @@ set(Upstream_VERSION 1.0.0)

configure_file(config.h.in ${CMAKE_BINARY_DIR}/config.h)

set(WINDOWS_EXPORT_ALL_SYMBOLS ON)

add_definitions(
  -D${CMAKE_HOST_SYSTEM_NAME}
)

if(NOT ${CMAKE_CXX_COMPILER} MATCHES "MSVC")
set(CMAKE_CXX_FLAGS "-fPIC -Wall")
endif()
@@ -25,7 +31,11 @@ add_library(dbpp STATIC
    src/loader.cpp
)

if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
    target_link_libraries(dbpp kernel32.lib)
else()
    target_link_libraries(dbpp dl)
endif()

install(TARGETS dbpp DESTINATION lib EXPORT dbppTargets)

CMakeSettings.json

0 → 100644
+27 −0
Original line number Diff line number Diff line
{
    "configurations": [
        {
            "name": "x64-Debug",
            "generator": "Ninja",
            "configurationType": "Debug",
            "inheritEnvironments": [ "msvc_x64_x64" ],
            "buildRoot": "${projectDir}\\out\\build\\${name}",
            "installRoot": "${projectDir}\\out\\install\\${name}",
            "cmakeCommandArgs": "",
            "buildCommandArgs": "",
            "ctestCommandArgs": "",
            "variables": [
                {
                    "name": "SQLite3_LIBRARY",
                    "value": "C:/Users/jan.koester/sqlite-src-3500400/sqlite3.lib",
                    "type": "FILEPATH"
                },
                {
                    "name": "SQLite3_INCLUDE_DIR",
                    "value": "C:/Users/jan.koester/sqlite-src-3500400",
                    "type": "PATH"
                }
            ]
        }
    ]
}
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ if(${PostgreSQL_FOUND})

    add_definitions(-DPGSQL)

    target_link_libraries(pgsql PRIVATE dbpp ${PostgreSQL_LIBRARIES})
    target_link_libraries(pgsql PUBLIC dbpp ${PostgreSQL_LIBRARIES})

    set_target_properties(pgsql PROPERTIES PREFIX "")

@@ -25,7 +25,7 @@ if(${SQLite3_FOUND})

    add_definitions(-DSQLITE)

    target_link_libraries(sqlite PRIVATE dbpp ${SQLite3_LIBRARIES})
    target_link_libraries(sqlite PUBLIC dbpp ${SQLite3_LIBRARIES})

    set_target_properties(sqlite PROPERTIES PREFIX "")

+10 −1
Original line number Diff line number Diff line
@@ -29,6 +29,11 @@
#include <cstring>
#include <vector>

#ifdef  Windows
#include <wtypes.h>
#endif //  Windows


#pragma once

namespace dbpp {
@@ -121,7 +126,11 @@ namespace dbpp {
    private:
        DatabaseApi *_DBApi;
        destroy_t*   _destroy_dbdriver;
#ifdef Windows
        HMODULE _handle;
#else
		void* _handle;
#endif
    };

};
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
 *******************************************************************************/

#include <algorithm>
#include <iterator>
#include <cstdio>

#include <database.h>
Loading