[nostalgia,olympic,studio] Add Olympic applib system, convert Studio to use it

This commit is contained in:
2023-12-10 20:39:08 -06:00
parent b6b59e77f5
commit 393259a010
10 changed files with 110 additions and 36 deletions
+6 -1
View File
@@ -3,7 +3,6 @@
add_subdirectory(core)
add_subdirectory(scene)
# module libraries
# Keel
@@ -17,6 +16,12 @@ target_link_libraries(
NostalgiaCore-Keel
NostalgiaScene-Keel
)
target_compile_definitions(
NostalgiaKeelModules PUBLIC
OLYMPIC_PROJECT_NAME="Nostalgia"
OLYMPIC_PROJECT_NAMESPACE=nostalgia
OLYMPIC_PROJECT_DATADIR=".nostalgia"
)
install(
FILES
keelmodules.hpp
+9 -9
View File
@@ -2,7 +2,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_executable(
nostalgia-studio WIN32 MACOSX_BUNDLE
main.cpp
${OLYMPIC_PATH}/applib/applib.cpp
)
target_link_libraries(
@@ -12,6 +12,14 @@ target_link_libraries(
StudioAppLib
)
install(
TARGETS
nostalgia-studio
RUNTIME DESTINATION
${NOSTALGIA_DIST_BIN}
BUNDLE DESTINATION .
)
if(CMAKE_BUILD_TYPE STREQUAL "Release" AND NOT WIN32)
# enable LTO
set_property(TARGET nostalgia-studio PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
@@ -27,11 +35,3 @@ install(
DESTINATION
${NOSTALGIA_DIST_RESOURCES}/icons
)
install(
TARGETS
nostalgia-studio
RUNTIME DESTINATION
${NOSTALGIA_DIST_BIN}
BUNDLE DESTINATION .
)
-20
View File
@@ -1,20 +0,0 @@
/*
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#include <nostalgia/modules/keelmodules.hpp>
#include <nostalgia/modules/studiomodules.hpp>
#include <studioapp/studioapp.hpp>
#ifdef _WIN32
int WinMain() {
auto const argc = __argc;
auto const argv = const_cast<const char**>(__argv);
#else
int main(int argc, const char **argv) {
#endif
nostalgia::registerKeelModules();
nostalgia::registerStudioModules();
return studio::main("Nostalgia Studio", ".nostalgia", argc, argv);
}