[nostalgia,olympic,studio] Add Olympic applib system, convert Studio to use it
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 .
|
||||
)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user