Commit 7be94467 authored by jan.koester's avatar jan.koester
Browse files

windows works

parent 6f4a286c
Loading
Loading
Loading
Loading
Loading
+5 −1
Changes for CMakeLists.txt: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
cmake_minimum_required(VERSION 3.18)

add_definitions(-D${CMAKE_HOST_SYSTEM_NAME})
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

add_definitions(-D${CMAKE_HOST_SYSTEM_NAME} -DDATAPATH="${CMAKE_INSTALL_PREFIX}/data")

message(STATUS "System: ${CMAKE_HOST_SYSTEM_NAME}")

+12 −0
Changes for client/client.h: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -28,6 +28,18 @@
#include <string>
#include <uuidp.h>

#ifndef Windows
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/file.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#else
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#endif

#include "session.h"
#include "user.h"

+4 −4
Changes for client/examples/CMakeLists.txt: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
add_executable(userlogin userlogin.cpp)

target_link_libraries(userlogin PRIVATE client-static)
target_link_libraries(userlogin PRIVATE netplus::netplus httppp::httppp client-static)

add_executable(clientlogin clientlogin.cpp)

target_link_libraries(clientlogin PRIVATE client-static)
target_link_libraries(clientlogin PRIVATE netplus::netplus httppp::httppp client-static)

add_executable(sessinfo sessinfo.cpp)

target_link_libraries(sessinfo PRIVATE client-static)
target_link_libraries(sessinfo PRIVATE netplus::netplus httppp::httppp  client-static)

add_executable(checkgpo checkgpo.cpp)

target_link_libraries(checkgpo PRIVATE client-static)
target_link_libraries(checkgpo PRIVATE netplus::netplus httppp::httppp client-static)
+35 −4
Changes for src/CMakeLists.txt: 35 added lines, 4 removed lines.
Original line number Diff line number Diff line
add_library(fback SHARED backends/file.cpp)

target_include_directories(
    fback
    PUBLIC
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
    $<BUILD_INTERFACE:${LIBUUIDP_INCLUDE_DIR}>
    $<INSTALL_INTERFACE:include>
)

list(APPEND authdbSrcs
    data.cpp
    backend.cpp
@@ -15,10 +23,23 @@ list(APPEND authdbSrcs

add_library( authobj OBJECT ${authdbSrcs})

target_link_libraries(authobj PRVIATE uuidp::uuidp)
target_include_directories(
    authobj
    PUBLIC
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
    $<INSTALL_INTERFACE:include>
)

include_directories(authobj
    BEFORE PRIVATE "${LIBUUIDP_INCLUDE_DIR}"
target_link_libraries(
    authobj
    PUBLIC
    fback
    uuidp::uuidp
    json-c::json-c
    confplus::confplus
    netplus::netplus
    httppp::httppp
    htmlpp::htmlpp
)

add_executable(authdb
@@ -28,7 +49,17 @@ add_executable(authdb
    $<TARGET_OBJECTS:authobj>
)

target_link_libraries(authdb PUBLIC fback uuidp::uuidp json-c::json-c httppp::httppp netplus::netplus confplus::confplus cmdplus::cmdplus htmlpp::htmlpp ${LIBUUID_LIBRARY})
target_link_libraries(authdb PUBLIC
    cmdplus::cmdplus
)

message(STATUS "NETPLUS: ${NETPLUS_INCLUDE_DIR}")

include_directories(
    BEFORE ${NETPLUS_INCLUDE_DIR}
)

target_link_libraries(authdb PUBLIC authobj)

install(FILES session.h authdb.h backend.h types.h group.h user.h DESTINATION include/authdb)

+1 −1
Changes for src/admin.cpp: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -409,7 +409,7 @@ namespace authdb {

            std::shared_ptr<authdb::AuthData::Record> curec=std::make_shared<authdb::AuthData::Record>();

            std::copy(&uid.value[0],&uid.value[sizeof(uuid_t)],&curec->ruid[0]);
            std::copy(&uid.value[0],&uid.value[sizeof(uuid::uuid_t)],&curec->ruid[0]);

            for (libhttppp::HttpForm::MultipartForm::Data* curformdat = curform.MultipartFormData.getFormData();
                    curformdat; curformdat = curformdat->nextData()) {
Loading