fixup
This commit is contained in:
parent
c102692955
commit
368b5dffdf
@ -14,23 +14,7 @@ set(HUNTER_BUILD_SHARED_LIBS TRUE)
|
||||
include(cmake/Compiler.cmake)
|
||||
include(cmake/FindAllRequirements.cmake)
|
||||
|
||||
|
||||
#hunter_add_package(Boost COMPONENTS system filesystem)
|
||||
#find_package(Boost CONFIG REQUIRED system filesystem)
|
||||
#target_link_libraries(... Boost::system Boost::filesystem)
|
||||
#add_executable(main main.cpp)
|
||||
#target_link_libraries(main PUBLIC nlohmann_json)
|
||||
#target_link_libraries(foo GTest::main) # GTest::gtest will be linked automatically
|
||||
#target_link_libraries(boo GTest::gtest)
|
||||
#target_link_libraries(... benchmark::benchmark)
|
||||
#target_link_libraries(... spdlog::spdlog)
|
||||
#add_executable(comprehensions comprehensions.cpp)
|
||||
#target_link_libraries(comprehensions PUBLIC range-v3::range-v3)
|
||||
|
||||
#set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/usr/share/cmake/Modules/")
|
||||
#find_package(Wt REQUIRED)
|
||||
#find_package(Sqlpp11 REQUIRED)
|
||||
#target_link_libraries(... PostgreSQL::libpq)
|
||||
include_directories(${CMAKE_BINARY_DIR}/external/include)
|
||||
|
||||
add_subdirectory(src)
|
||||
#add_subdirectory(tests)
|
||||
|
||||
@ -112,12 +112,18 @@ build_external_project(project_hhdate date
|
||||
-DTZ_CXX_STANDARD=14
|
||||
)
|
||||
|
||||
add_library(date INTERFACE IMPORTED)
|
||||
add_dependencies(date project_hhdate)
|
||||
|
||||
build_external_project(project_sqlpp sqlpp
|
||||
https://github.com/rbock/sqlpp11.git
|
||||
-DCMAKE_INSTALL_PREFIX=${EXTERNAL_LOCATION}
|
||||
-DENABLE_TESTS=FALSE
|
||||
)
|
||||
|
||||
add_library(sqlpp INTERFACE IMPORTED)
|
||||
add_dependencies(sqlpp project_sqlpp)
|
||||
|
||||
link_directories(${_HUNTER_ROOT}/lib)
|
||||
|
||||
find_library(wt REQUIRED)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
project( eedb_app )
|
||||
INCLUDE_DIRECTORIES(.)
|
||||
|
||||
#add_subdirectory(utils)
|
||||
#add_subdirectory(eedb)
|
||||
add_subdirectory(utils)
|
||||
add_subdirectory(eedb)
|
||||
add_subdirectory(app)
|
||||
|
||||
@ -3,23 +3,18 @@ set(SOURCES
|
||||
|
||||
#INCLUDE_DIRECTORIES(${PostgreSQL_INCLUDE_DIRS})
|
||||
|
||||
include_directories(${CMAKE_BINARY_DIR}/external/include)
|
||||
|
||||
add_executable(eedb ${SOURCES} )
|
||||
|
||||
#add_dependencies(eedb project_wt)
|
||||
|
||||
target_link_libraries(eedb
|
||||
wthttp # or {Wt_HTTP_DEBUG_LIBRARY}
|
||||
wt # or {Wt_DEBUG_LIBRARY}
|
||||
# ${Wt_LIBRARY} # or {Wt_DEBUG_LIBRARY}
|
||||
# ${Wt_HTTP_LIBRARY} # or {Wt_HTTP_DEBUG_LIBRARY}
|
||||
Boost::system
|
||||
Boost::filesystem
|
||||
Boost::thread
|
||||
Boost::program_options
|
||||
z
|
||||
# ${Boost_LIBRARIES}
|
||||
# eedb_db auth
|
||||
)
|
||||
|
||||
|
||||
@ -11,12 +11,12 @@
|
||||
//#include <eedb/widgets/DefaultHomePage.hpp>
|
||||
//#include <eedb/widgets/DefaultNavigationBar.hpp>
|
||||
|
||||
//#include <Wt/WApplication.h>
|
||||
//#include <Wt/WServer.h>
|
||||
#include <Wt/WApplication.h>
|
||||
#include <Wt/WServer.h>
|
||||
|
||||
//Wt::WApplication * createApplication(const Wt::WEnvironment & env) {
|
||||
// using std::move;
|
||||
Wt::WApplication * createApplication(const Wt::WEnvironment & env) {
|
||||
// using std::make_unique;
|
||||
// using std::move;
|
||||
// using std::unique_ptr;
|
||||
|
||||
// auto dbConfig = make_unique< eedb::db::PgConfig >(env);
|
||||
@ -37,9 +37,9 @@
|
||||
// };
|
||||
|
||||
// return new eedb::EEDB{std::move(session), authPageFactory, homePageFactory};
|
||||
//}
|
||||
}
|
||||
|
||||
//int main(int argc, char ** argv) {
|
||||
int main(int argc, char ** argv) {
|
||||
// try {
|
||||
// Wt::WServer server(argc, argv, WTHTTP_CONFIGURATION);
|
||||
// server.addEntryPoint(Wt::Application, createApplication);
|
||||
@ -50,47 +50,5 @@
|
||||
// } catch(std::exception & e) {
|
||||
// std::cerr << "exception: " << e.what() << std::endl;
|
||||
// }
|
||||
// return 0;
|
||||
//}
|
||||
|
||||
|
||||
#include <Wt/WApplication.h>
|
||||
#include <Wt/WBreak.h>
|
||||
#include <Wt/WContainerWidget.h>
|
||||
#include <Wt/WLineEdit.h>
|
||||
#include <Wt/WPushButton.h>
|
||||
#include <Wt/WText.h>
|
||||
|
||||
class HelloApplication : public Wt::WApplication
|
||||
{
|
||||
public:
|
||||
HelloApplication(const Wt::WEnvironment& env);
|
||||
|
||||
private:
|
||||
Wt::WLineEdit *nameEdit_;
|
||||
Wt::WText *greeting_;
|
||||
|
||||
void greet();
|
||||
};
|
||||
|
||||
HelloApplication::HelloApplication(const Wt::WEnvironment& env)
|
||||
: Wt::WApplication(env)
|
||||
{
|
||||
setTitle("Hello world");
|
||||
|
||||
root()->addWidget(std::make_unique<Wt::WText>("Your name, please? "));
|
||||
nameEdit_ = root()->addWidget(std::make_unique<Wt::WLineEdit>());
|
||||
Wt::WPushButton *button = root()->addWidget(std::make_unique<Wt::WPushButton>("Greet me."));
|
||||
root()->addWidget(std::make_unique<Wt::WBreak>());
|
||||
greeting_ = root()->addWidget(std::make_unique<Wt::WText>());
|
||||
button->clicked().connect(this, [this](){
|
||||
greeting_->setText("Hello there, " + nameEdit_->text());
|
||||
});
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
return Wt::WRun(argc, argv, [](const Wt::WEnvironment& env) {
|
||||
return std::make_unique<HelloApplication>(env);
|
||||
});
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1,16 +1,17 @@
|
||||
file(GLOB SOURCE
|
||||
EEDB.cpp
|
||||
Session.cpp
|
||||
# EEDB.cpp
|
||||
# Session.cpp
|
||||
|
||||
auth/PgUserAuth.cpp
|
||||
auth/Services.cpp
|
||||
data/*
|
||||
widgets/*
|
||||
model/*)
|
||||
# auth/PgUserAuth.cpp
|
||||
# auth/Services.cpp
|
||||
# data/*
|
||||
# widgets/*
|
||||
# model/*
|
||||
)
|
||||
|
||||
add_subdirectory(db)
|
||||
include_directories( ${PostgreSQL_INCLUDE_DIRS} )
|
||||
#add_subdirectory(db)
|
||||
#include_directories( ${PostgreSQL_INCLUDE_DIRS} )
|
||||
|
||||
add_library(auth STATIC ${SOURCE})
|
||||
target_link_libraries( auth eedb_db )
|
||||
#add_library(auth STATIC ${SOURCE})
|
||||
#target_link_libraries( auth eedb_db )
|
||||
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
#include "EEDB.hpp"
|
||||
|
||||
#include <Wt/WApplication>
|
||||
#include <Wt/WEnvironment>
|
||||
|
||||
#include <eedb/Session.hpp>
|
||||
#include <eedb/auth/PgUserAuth.hpp>
|
||||
#include <eedb/db/connection.hpp>
|
||||
@ -12,18 +9,18 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <Wt/WApplication>
|
||||
#include <Wt/WBorderLayout>
|
||||
#include <Wt/WContainerWidget>
|
||||
#include <Wt/WEnvironment>
|
||||
#include <Wt/WLineEdit>
|
||||
#include <Wt/WMessageBox>
|
||||
#include <Wt/WNavigationBar>
|
||||
#include <Wt/WPopupMenu>
|
||||
#include <Wt/WServer>
|
||||
#include <Wt/WStackedWidget>
|
||||
#include <Wt/WText>
|
||||
#include <Wt/WTextArea>
|
||||
#include <Wt/WApplication.h>
|
||||
#include <Wt/WBorderLayout.h>
|
||||
#include <Wt/WContainerWidget.h>
|
||||
#include <Wt/WEnvironment.h>
|
||||
#include <Wt/WLineEdit.h>
|
||||
#include <Wt/WMessageBox.h>
|
||||
#include <Wt/WNavigationBar.h>
|
||||
#include <Wt/WPopupMenu.h>
|
||||
#include <Wt/WServer.h>
|
||||
#include <Wt/WStackedWidget.h>
|
||||
#include <Wt/WText.h>
|
||||
#include <Wt/WTextArea.h>
|
||||
|
||||
#include <eedb/widgets/BootstrapTheme.hpp>
|
||||
using std::move;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
#include <Wt/WApplication>
|
||||
#include <Wt/WApplication.h>
|
||||
|
||||
namespace Wt {
|
||||
class WContainerWidget;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <Wt/Auth/Login>
|
||||
#include <Wt/WEnvironment>
|
||||
#include <Wt/Auth/Login.h>
|
||||
#include <Wt/WEnvironment.h>
|
||||
|
||||
namespace eedb::auth {
|
||||
class PgUserAuth;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <Wt/Auth/AbstractUserDatabase>
|
||||
#include <Wt/Auth/AbstractUserDatabase.h>
|
||||
|
||||
namespace eedb::db {
|
||||
class PgConnection;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user