Support minimal dependency linux build.
This commit is contained in:
parent
92a35a5bc9
commit
7ce29ce8ae
14 changed files with 421 additions and 176 deletions
|
@ -1,24 +1,9 @@
|
|||
# Sample GUI
|
||||
add_executable(sample_gui gui-main.cpp)
|
||||
target_include_directories(sample_gui PUBLIC
|
||||
"${PROJECT_SOURCE_DIR}/src/console"
|
||||
"${PROJECT_SOURCE_DIR}/src/client"
|
||||
)
|
||||
target_link_libraries(sample_gui PUBLIC client windows console core
|
||||
network database geometry audio web)
|
||||
|
||||
add_subdirectory(sample-gui)
|
||||
|
||||
if(WIN32)
|
||||
add_executable(sample_gui_win WIN32 gui-main-win.cpp)
|
||||
target_include_directories(sample_gui PUBLIC
|
||||
"${PROJECT_SOURCE_DIR}/src/console"
|
||||
"${PROJECT_SOURCE_DIR}/src/client"
|
||||
)
|
||||
target_link_libraries(sample_gui_win PUBLIC client windows console core
|
||||
network database geometry audio web)
|
||||
set_property(TARGET sample_gui_win PROPERTY FOLDER apps)
|
||||
|
||||
add_subdirectory(directx-practice)
|
||||
|
||||
add_subdirectory(directx-practice)
|
||||
endif()
|
||||
|
||||
# Sample Console
|
||||
|
@ -30,7 +15,6 @@ target_link_libraries(sample_console PUBLIC console core network
|
|||
database geometry audio web)
|
||||
|
||||
set_property(TARGET sample_console PROPERTY FOLDER apps)
|
||||
set_property(TARGET sample_gui PROPERTY FOLDER apps)
|
||||
|
||||
add_subdirectory(website-generator)
|
||||
|
||||
|
|
27
apps/sample-gui/CMakeLists.txt
Normal file
27
apps/sample-gui/CMakeLists.txt
Normal file
|
@ -0,0 +1,27 @@
|
|||
|
||||
if(WIN32)
|
||||
add_executable(sample_gui_win WIN32 gui-main-win.cpp)
|
||||
target_include_directories(sample_gui PUBLIC
|
||||
"${PROJECT_SOURCE_DIR}/src/console"
|
||||
"${PROJECT_SOURCE_DIR}/src/client"
|
||||
)
|
||||
target_link_libraries(sample_gui_win PUBLIC client windows console core
|
||||
network database geometry audio web)
|
||||
set_property(TARGET sample_gui_win PROPERTY FOLDER apps)
|
||||
else()
|
||||
find_package(X11 QUIET)
|
||||
if(X11_FOUND)
|
||||
add_executable(sample_gui gui-main.cpp)
|
||||
target_include_directories(sample_gui PUBLIC
|
||||
"${PROJECT_SOURCE_DIR}/src/console"
|
||||
"${PROJECT_SOURCE_DIR}/src/client"
|
||||
)
|
||||
target_link_libraries(sample_gui PUBLIC client windows console core
|
||||
network database geometry audio web)
|
||||
set_property(TARGET sample_gui PROPERTY FOLDER apps)
|
||||
else()
|
||||
message(STATUS "Skipping sample GUI as no X11 dev support")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
@ -50,8 +50,7 @@ void WebsiteGenerator::parseTemplateFiles()
|
|||
const auto template_files = Directory::getFilesWithExtension(template_path, ".html");
|
||||
for (const auto& path : template_files)
|
||||
{
|
||||
auto file = TemplateFile(path);
|
||||
mTemplateFiles[path.stem().string()] = file;
|
||||
mTemplateFiles[path.stem().string()] = std::make_unique<TemplateFile>(path);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ public:
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
Path mPath;
|
||||
};
|
||||
|
@ -80,5 +81,5 @@ private:
|
|||
GeneratorConfig mConfig;
|
||||
std::vector<ContentPage> mPages;
|
||||
std::vector<ContentArticle> mArticles;
|
||||
std::unordered_map<std::string, TemplateFile> mTemplateFiles;
|
||||
std::unordered_map<std::string, std::unique_ptr<TemplateFile> > mTemplateFiles;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue