[nostalgia,olympic] Cleanup CMake

This commit is contained in:
2023-12-23 12:23:47 -06:00
parent 978f2f9c4f
commit 2dba592a42
15 changed files with 64 additions and 51 deletions
+12 -3
View File
@@ -1,6 +1,15 @@
project(nostalgia CXX)
#project packages
set(NOSTALGIA_BUILD_PLAYER ON CACHE BOOL "Build Player")
set(NOSTALGIA_BUILD_STUDIO ON CACHE BOOL "Build Studio")
if(BUILDCORE_TARGET STREQUAL "gba")
set(NOSTALGIA_BUILD_STUDIO OFF)
endif()
if(APPLE)
set(CMAKE_INSTALL_NAME_DIR "@executable_path/../Library/nostalgia")
set(NOSTALGIA_DIST_BIN NostalgiaStudio.app/Contents/MacOS)
@@ -17,13 +26,13 @@ endif()
add_subdirectory(modules)
if(NOSTALGIA_BUILD_PLAYER)
if(${NOSTALGIA_BUILD_PLAYER})
add_subdirectory(player)
endif()
if(TURBINE_BUILD_TYPE STREQUAL "Native")
if(NOT BUILDCORE_TARGET STREQUAL "gba")
add_subdirectory(tools)
if(NOSTALGIA_BUILD_STUDIO)
if(${NOSTALGIA_BUILD_STUDIO})
add_subdirectory(studio)
endif()
endif()
+18 -20
View File
@@ -23,26 +23,24 @@ install(
include/nostalgia/modules
)
if(${OLYMPIC_BUILD_STUDIO})
# Studio
if(TURBINE_BUILD_TYPE STREQUAL "Native")
add_library(
NostalgiaStudioModules STATIC
studiomodules.cpp
)
target_link_libraries(
NostalgiaStudioModules PUBLIC
StudioAppLib
NostalgiaCore-Studio-ImGui
NostalgiaScene-Studio
)
install(
FILES
studiomodules.hpp
DESTINATION
include/nostalgia/modules
)
endif()
# Studio
if(NOSTALGIA_BUILD_STUDIO)
add_library(
NostalgiaStudioModules STATIC
studiomodules.cpp
)
target_link_libraries(
NostalgiaStudioModules PUBLIC
StudioAppLib
NostalgiaCore-Studio-ImGui
NostalgiaScene-Studio
)
install(
FILES
studiomodules.hpp
DESTINATION
include/nostalgia/modules
)
endif()
add_library(NostalgiaProfile INTERFACE)
+2 -1
View File
@@ -1,5 +1,6 @@
add_subdirectory(src)
if(NOT TURBINE_BUILD_TYPE STREQUAL "GBA")
if(NOT BUILDCORE_TARGET STREQUAL "gba")
add_subdirectory(test)
endif()
@@ -5,7 +5,7 @@ add_library(
)
add_subdirectory(gba)
if(NOT TURBINE_BUILD_TYPE STREQUAL "GBA")
if(NOT BUILDCORE_TARGET STREQUAL "gba")
add_subdirectory(opengl)
endif()
@@ -15,7 +15,7 @@ target_link_libraries(
Turbine
)
if(TURBINE_BUILD_TYPE STREQUAL "GBA")
if(BUILDCORE_TARGET STREQUAL "gba")
set_source_files_properties(gfx.cpp PROPERTIES COMPILE_FLAGS -marm)
target_link_libraries(NostalgiaCore PUBLIC NostalgiaCore-GBA)
endif()
-2
View File
@@ -2,8 +2,6 @@
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#include <keel/module.hpp>
#include <studioapp/studioapp.hpp>
#include <nostalgia/core/studiomodule.hpp>