Compare commits

...

3 Commits

16 changed files with 83 additions and 60 deletions

View File

@ -24,6 +24,10 @@ else()
set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif() endif()
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
if(APPLE) if(APPLE)
set(CMAKE_MACOSX_RPATH OFF) set(CMAKE_MACOSX_RPATH OFF)
set(CMAKE_INSTALL_NAME_DIR "@executable_path/../Library/nostalgia") set(CMAKE_INSTALL_NAME_DIR "@executable_path/../Library/nostalgia")
@ -33,11 +37,14 @@ if(APPLE)
set(NOSTALGIA_DIST_RESOURCES nostalgia-studio.app/Contents/Resources) set(NOSTALGIA_DIST_RESOURCES nostalgia-studio.app/Contents/Resources)
set(NOSTALGIA_DIST_MAC_APP_CONTENTS nostalgia-studio.app/Contents) set(NOSTALGIA_DIST_MAC_APP_CONTENTS nostalgia-studio.app/Contents)
else() else()
set(CMAKE_INSTALL_RPATH "$ORIGIN" "$ORIGIN/../lib/ox" "$ORIGIN/../lib/nostalgia" "$ORIGIN/../") if(UNIX)
set(BUILD_SHARED_LIBS ON)
endif()
set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib")
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(NOSTALGIA_DIST_BIN bin) set(NOSTALGIA_DIST_BIN bin)
set(NOSTALGIA_DIST_LIB lib) set(NOSTALGIA_DIST_LIB lib)
set(NOSTALGIA_DIST_MODULE lib/nostalgia/modules) set(NOSTALGIA_DIST_MODULE lib)
set(NOSTALGIA_DIST_RESOURCES share) set(NOSTALGIA_DIST_RESOURCES share)
endif() endif()

View File

@ -3,10 +3,10 @@ BUILDCORE_PATH=deps/buildcore
include ${BUILDCORE_PATH}/base.mk include ${BUILDCORE_PATH}/base.mk
ifeq ($(OS),darwin) ifeq ($(OS),darwin)
NOSTALGIA_STUDIO=./build/${HOST}/${CURRENT_BUILD}/src/nostalgia/studio/nostalgia-studio.app/Contents/MacOS/nostalgia-studio NOSTALGIA_STUDIO=./build/${CURRENT_BUILD}/src/nostalgia/studio/nostalgia-studio.app/Contents/MacOS/nostalgia-studio
MGBA=/Applications/mGBA.app/Contents/MacOS/mGBA MGBA=/Applications/mGBA.app/Contents/MacOS/mGBA
else else
NOSTALGIA_STUDIO=./build/${HOST}/${CURRENT_BUILD}/src/nostalgia/studio/nostalgia-studio NOSTALGIA_STUDIO=./build/${CURRENT_BUILD}/bin/nostalgia-studio
MGBA=mgba-qt MGBA=mgba-qt
endif endif
@ -16,7 +16,7 @@ pkg-gba: install
.PHONY: run .PHONY: run
run: build run: build
./build/${HOST}/${CURRENT_BUILD}/src/nostalgia/player/nostalgia sample_project ./build/${CURRENT_BUILD}/bin/nostalgia sample_project
.PHONY: run-studio .PHONY: run-studio
run-studio: build run-studio: build
${NOSTALGIA_STUDIO} ${NOSTALGIA_STUDIO}
@ -25,7 +25,7 @@ gba-run: pkg-gba
${MGBA} nostalgia.gba ${MGBA} nostalgia.gba
.PHONY: debug .PHONY: debug
debug: build debug: build
${DEBUGGER} ./build/${HOST}/${CURRENT_BUILD}/src/nostalgia/player/nostalgia sample_project ${DEBUGGER} ./build/${CURRENT_BUILD}/bin/nostalgia sample_project
.PHONY: debug-studio .PHONY: debug-studio
debug-studio: build debug-studio: build
${DEBUGGER} ${NOSTALGIA_STUDIO} ${DEBUGGER} ${NOSTALGIA_STUDIO}

View File

@ -12,3 +12,11 @@ target_include_directories(
lodepng PUBLIC SYSTEM lodepng PUBLIC SYSTEM
include include
) )
install(
TARGETS
lodepng
DESTINATION
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)

View File

@ -8,7 +8,7 @@ target_link_libraries(
OxClaw OxClaw
) )
add_test("[ox/claw] ClawTest ClawHeaderReader" ClawTest ClawHeaderReader) add_test("[ox/claw] ClawHeaderReader" ${CMAKE_BINARY_DIR}/bin/ClawTest ClawHeaderReader)
add_test("[ox/claw] ClawTest ClawHeaderReader2" ClawTest ClawHeaderReader2) add_test("[ox/claw] ClawHeaderReader2" ${CMAKE_BINARY_DIR}/bin/ClawTest ClawHeaderReader2)
add_test("[ox/claw] ClawTest ClawWriter" ClawTest ClawWriter) add_test("[ox/claw] ClawWriter" ${CMAKE_BINARY_DIR}/bin/ClawTest ClawWriter)
add_test("[ox/claw] ClawTest ClawReader" ClawTest ClawReader) add_test("[ox/claw] ClawReader" ${CMAKE_BINARY_DIR}/bin/ClawTest ClawReader)

View File

@ -7,4 +7,4 @@ add_executable(
target_link_libraries(EventTest OxEvent) target_link_libraries(EventTest OxEvent)
add_test("[ox/event] Test 1" EventTest "test1") add_test("[ox/event] Test 1" ${CMAKE_BINARY_DIR}/bin/EventTest "test1")

View File

@ -10,20 +10,20 @@ target_link_libraries(
OxMetalClaw OxMetalClaw
) )
add_test("[ox/fs] PtrArith::setSize" FSTests PtrArith::setSize) add_test("[ox/fs] PtrArith::setSize" ${CMAKE_BINARY_DIR}/bin/FSTests PtrArith::setSize)
add_test("[ox/fs] PathIterator::next1" FSTests PathIterator::next1) add_test("[ox/fs] PathIterator::next1" ${CMAKE_BINARY_DIR}/bin/FSTests PathIterator::next1)
add_test("[ox/fs] PathIterator::next2" FSTests PathIterator::next2) add_test("[ox/fs] PathIterator::next2" ${CMAKE_BINARY_DIR}/bin/FSTests PathIterator::next2)
add_test("[ox/fs] PathIterator::next3" FSTests PathIterator::next3) add_test("[ox/fs] PathIterator::next3" ${CMAKE_BINARY_DIR}/bin/FSTests PathIterator::next3)
add_test("[ox/fs] PathIterator::next4" FSTests PathIterator::next4) add_test("[ox/fs] PathIterator::next4" ${CMAKE_BINARY_DIR}/bin/FSTests PathIterator::next4)
add_test("[ox/fs] PathIterator::next5" FSTests PathIterator::next5) add_test("[ox/fs] PathIterator::next5" ${CMAKE_BINARY_DIR}/bin/FSTests PathIterator::next5)
add_test("[ox/fs] PathIterator::hasNext" FSTests PathIterator::hasNext) add_test("[ox/fs] PathIterator::hasNext" ${CMAKE_BINARY_DIR}/bin/FSTests PathIterator::hasNext)
add_test("[ox/fs] PathIterator::dirPath" FSTests PathIterator::dirPath) add_test("[ox/fs] PathIterator::dirPath" ${CMAKE_BINARY_DIR}/bin/FSTests PathIterator::dirPath)
add_test("[ox/fs] PathIterator::fileName" FSTests PathIterator::fileName) add_test("[ox/fs] PathIterator::fileName" ${CMAKE_BINARY_DIR}/bin/FSTests PathIterator::fileName)
add_test("[ox/fs] NodeBuffer::insert" FSTests "NodeBuffer::insert") add_test("[ox/fs] NodeBuffer::insert" ${CMAKE_BINARY_DIR}/bin/FSTests "NodeBuffer::insert")
add_test("[ox/fs] FileStore::readWrite" FSTests "FileStore::readWrite") add_test("[ox/fs] FileStore::readWrite" ${CMAKE_BINARY_DIR}/bin/FSTests "FileStore::readWrite")
add_test("[ox/fs] Directory" FSTests "Directory") add_test("[ox/fs] Directory" ${CMAKE_BINARY_DIR}/bin/FSTests "Directory")
add_test("[ox/fs] FileSystem" FSTests "FileSystem") add_test("[ox/fs] FileSystem" ${CMAKE_BINARY_DIR}/bin/FSTests "FileSystem")

View File

@ -8,9 +8,9 @@ target_link_libraries(
OxMetalClaw OxMetalClaw
) )
add_test("[ox/mc] McTest Writer" McTest MetalClawWriter) add_test("[ox/mc] Writer" ${CMAKE_BINARY_DIR}/bin/McTest MetalClawWriter)
add_test("[ox/mc] McTest Reader" McTest MetalClawReader) add_test("[ox/mc] Reader" ${CMAKE_BINARY_DIR}/bin/McTest MetalClawReader)
#add_test("[ox/mc] McTest MetalClawDef" McTest MetalClawDef) #add_test("[ox/mc] MetalClawDef" ${CMAKE_BINARY_DIR}/bin/McTest MetalClawDef)
add_test("[ox/mc] McTest MetalClawModelValue" McTest MetalClawModelValue) add_test("[ox/mc] MetalClawModelValue" ${CMAKE_BINARY_DIR}/bin/McTest MetalClawModelValue)
add_test("[ox/mc] McTest encodeInteger" McTest encodeInteger) add_test("[ox/mc] encodeInteger" ${CMAKE_BINARY_DIR}/bin/McTest encodeInteger)
add_test("[ox/mc] McTest decodeInteger" McTest decodeInteger) add_test("[ox/mc] decodeInteger" ${CMAKE_BINARY_DIR}/bin/McTest decodeInteger)

View File

@ -8,6 +8,6 @@ target_link_libraries(
OxModel OxModel
) )
add_test("[ox/model] ModelTest ModelValue" ModelTest ModelValue) add_test("[ox/model] ModelValue" ${CMAKE_BINARY_DIR}/bin/ModelTest ModelValue)
add_test("[ox/model] ModelTest getModelTypeName" ModelTest getModelTypeName) add_test("[ox/model] getModelTypeName" ${CMAKE_BINARY_DIR}/bin/ModelTest getModelTypeName)
add_test("[ox/model] ModelTest getModelTypeVersion" ModelTest getModelTypeVersion) add_test("[ox/model] getModelTypeVersion" ${CMAKE_BINARY_DIR}/bin/ModelTest getModelTypeVersion)

View File

@ -8,7 +8,7 @@ target_link_libraries(
OxOrganicClaw OxOrganicClaw
) )
add_test("[ox/oc] OcTest Writer" OcTest OrganicClawWriter) add_test("[ox/oc] Writer" ${CMAKE_BINARY_DIR}/bin/OcTest OrganicClawWriter)
add_test("[ox/oc] OcTest Reader" OcTest OrganicClawReader) add_test("[ox/oc] Reader" ${CMAKE_BINARY_DIR}/bin/OcTest OrganicClawReader)
add_test("[ox/oc] OcTest OrganicClawModelValue" OcTest OrganicClawModelValue) add_test("[ox/oc] OrganicClawModelValue" ${CMAKE_BINARY_DIR}/bin/OcTest OrganicClawModelValue)
add_test("[ox/oc] OcTest OrganicClawDef" OcTest OrganicClawDef) add_test("[ox/oc] OrganicClawDef" ${CMAKE_BINARY_DIR}/bin/OcTest OrganicClawDef)

View File

@ -1,6 +1,6 @@
add_library( add_library(
OxPreloader STATIC OxPreloader
preloader.cpp preloader.cpp
) )

View File

@ -7,20 +7,20 @@ add_executable(
target_link_libraries(StdTest OxStd) target_link_libraries(StdTest OxStd)
add_test("[ox/std] ox_memcmp ABCDEFG != HIJKLMN" StdTest "ABCDEFG != HIJKLMN") add_test("[ox/std] ox_memcmp ABCDEFG != HIJKLMN" ${CMAKE_BINARY_DIR}/bin/StdTest "ABCDEFG != HIJKLMN")
add_test("[ox/std] ox_memcmp HIJKLMN != ABCDEFG" StdTest "HIJKLMN != ABCDEFG") add_test("[ox/std] ox_memcmp HIJKLMN != ABCDEFG" ${CMAKE_BINARY_DIR}/bin/StdTest "HIJKLMN != ABCDEFG")
add_test("[ox/std] ox_memcmp ABCDEFG == ABCDEFG" StdTest "ABCDEFG == ABCDEFG") add_test("[ox/std] ox_memcmp ABCDEFG == ABCDEFG" ${CMAKE_BINARY_DIR}/bin/StdTest "ABCDEFG == ABCDEFG")
add_test("[ox/std] ox_memcmp ABCDEFGHI == ABCDEFG" StdTest "ABCDEFGHI == ABCDEFG") add_test("[ox/std] ox_memcmp ABCDEFGHI == ABCDEFG" ${CMAKE_BINARY_DIR}/bin/StdTest "ABCDEFGHI == ABCDEFG")
add_test("[ox/std] itoa" StdTest "itoa") add_test("[ox/std] itoa" ${CMAKE_BINARY_DIR}/bin/StdTest "itoa")
add_test("[ox/std] BString" StdTest "BString") add_test("[ox/std] BString" ${CMAKE_BINARY_DIR}/bin/StdTest "BString")
add_test("[ox/std] String" StdTest "String") add_test("[ox/std] String" ${CMAKE_BINARY_DIR}/bin/StdTest "String")
add_test("[ox/std] Vector" StdTest "Vector") add_test("[ox/std] Vector" ${CMAKE_BINARY_DIR}/bin/StdTest "Vector")
add_test("[ox/std] HashMap" StdTest "HashMap") add_test("[ox/std] HashMap" ${CMAKE_BINARY_DIR}/bin/StdTest "HashMap")
add_test("[ox/std] HeapMgr" StdTest malloc) add_test("[ox/std] HeapMgr" ${CMAKE_BINARY_DIR}/bin/StdTest malloc)
add_test("[ox/std] Serialize-Int" StdTest "Serialize-Int") add_test("[ox/std] Serialize-Int" ${CMAKE_BINARY_DIR}/bin/StdTest "Serialize-Int")
add_test("[ox/std] BufferWriter" StdTest "BufferWriter") add_test("[ox/std] BufferWriter" ${CMAKE_BINARY_DIR}/bin/StdTest "BufferWriter")
add_test("[ox/std] StringSplit" StdTest "StringSplit") add_test("[ox/std] StringSplit" ${CMAKE_BINARY_DIR}/bin/StdTest "StringSplit")
add_test("[ox/std] FromHex" StdTest "FromHex") add_test("[ox/std] FromHex" ${CMAKE_BINARY_DIR}/bin/StdTest "FromHex")
add_test("[ox/std] ToHex" StdTest "ToHex") add_test("[ox/std] ToHex" ${CMAKE_BINARY_DIR}/bin/StdTest "ToHex")
add_test("[ox/std] UUID" StdTest "UUID") add_test("[ox/std] UUID" ${CMAKE_BINARY_DIR}/bin/StdTest "UUID")
add_test("[ox/std] UUID::generate" StdTest "UUID::generate") add_test("[ox/std] UUID::generate" ${CMAKE_BINARY_DIR}/bin/StdTest "UUID::generate")

View File

@ -8,4 +8,4 @@ target_link_libraries(
Keel Keel
) )
add_test("[keel] KeelTest writeUuidHeader" KeelTest writeUuidHeader) add_test("[keel] writeUuidHeader" ${CMAKE_BINARY_DIR}/bin/KeelTest writeUuidHeader)

View File

@ -8,7 +8,7 @@ add_subdirectory(scene)
# Keel # Keel
add_library( add_library(
NostalgiaKeelModules OBJECT NostalgiaKeelModules STATIC
keelmodules.cpp keelmodules.cpp
) )
target_link_libraries( target_link_libraries(
@ -27,7 +27,7 @@ install(
# Studio # Studio
if(TURBINE_BUILD_TYPE STREQUAL "Native") if(TURBINE_BUILD_TYPE STREQUAL "Native")
add_library( add_library(
NostalgiaStudioModules NostalgiaStudioModules STATIC
studiomodules.cpp studiomodules.cpp
) )
target_link_libraries( target_link_libraries(

View File

@ -8,7 +8,7 @@ add_library(
) )
add_library( add_library(
NostalgiaCore-Studio-ImGui OBJECT NostalgiaCore-Studio-ImGui
studiomodule.cpp studiomodule.cpp
paletteeditor-imgui.cpp paletteeditor-imgui.cpp
tilesheeteditor-imgui.cpp tilesheeteditor-imgui.cpp

View File

@ -19,3 +19,11 @@ add_subdirectory(keel)
if(NOSTALGIA_BUILD_STUDIO) if(NOSTALGIA_BUILD_STUDIO)
add_subdirectory(studio) add_subdirectory(studio)
endif() endif()
install(
TARGETS
NostalgiaScene
DESTINATION
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)

View File

@ -1,5 +1,5 @@
add_library( add_library(
NostalgiaScene-Studio OBJECT NostalgiaScene-Studio
studiomodule.cpp studiomodule.cpp
sceneeditor-imgui.cpp sceneeditor-imgui.cpp
sceneeditor.cpp sceneeditor.cpp