Add IDE switch to CMake options, Add charset.png to dist
This commit is contained in:
parent
30a992efad
commit
329e8be825
@ -2,12 +2,13 @@ cmake_minimum_required(VERSION 2.8.8)
|
||||
|
||||
project(nostalgia)
|
||||
|
||||
set(WOMBAT_BUILD_TYPE "Native" CACHE STRING "The type of build to produce(Native/GBA)")
|
||||
set(NOSTALGIA_BUILD_TYPE "Native" CACHE STRING "The type of build to produce(Native/GBA)")
|
||||
set(NOSTALGIA_IDE_BUILD "ON" CACHE STRING "Build for IDE's to run")
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
||||
include(address_sanitizer)
|
||||
|
||||
if (WOMBAT_BUILD_TYPE STREQUAL "GBA")
|
||||
if(NOSTALGIA_BUILD_TYPE STREQUAL "GBA")
|
||||
include(GBA)
|
||||
add_definitions(
|
||||
-nostdlib
|
||||
@ -22,8 +23,10 @@ add_definitions(
|
||||
-Wsign-compare
|
||||
)
|
||||
|
||||
if(NOSTALGIA_IDE_BUILD STREQUAL "ON")
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
endif()
|
||||
set(CMAKE_INSTALL_RPATH "$ORIGIN" "$ORIGIN/../lib/nostalgia")
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
|
||||
|
@ -9,4 +9,5 @@ echo NOSTALGIA_MEDIA_HEADER_________ > media_header.txt
|
||||
|
||||
${DEVKITARM}/bin/padbin 32 build/gba-release/nostalgia.bin
|
||||
cat build/gba-release/nostalgia.bin media_header.txt nostalgia_media.oxfs > nostalgia.gba
|
||||
rm -f media_header.txt
|
||||
${DEVKITARM}/bin/gbafix nostalgia.gba
|
||||
|
@ -10,7 +10,7 @@ BUILD_TYPE=$2
|
||||
if [[ $TARGET == windows ]]; then
|
||||
toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/Modules/Mingw.cmake"
|
||||
elif [[ $TARGET == gba ]]; then
|
||||
toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/Modules/GBA.cmake -DWOMBAT_BUILD_TYPE=GBA -DOX_USE_STDLIB=OFF"
|
||||
toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/Modules/GBA.cmake -DNOSTALGIA_BUILD_TYPE=GBA -DOX_USE_STDLIB=OFF"
|
||||
fi
|
||||
|
||||
if [[ $BUILD_TYPE == debug ]]; then
|
||||
@ -27,6 +27,7 @@ pushd $buildDir
|
||||
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
||||
-DCMAKE_INSTALL_PREFIX="$distDir" \
|
||||
-DCMAKE_INSTALL_RPATH="$project/dist/${TARGET}-${BUILD_TYPE}/lib/nostalgia" \
|
||||
-DNOSTALGIA_IDE_BUILD=OFF \
|
||||
$buildTypeArgs \
|
||||
$toolchain \
|
||||
$project
|
||||
|
@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.11)
|
||||
|
||||
#setup libraries
|
||||
|
||||
if(NOT WOMBAT_BUILD_TYPE STREQUAL "GBA")
|
||||
if(NOT NOSTALGIA_BUILD_TYPE STREQUAL "GBA")
|
||||
find_package(Qt5Widgets)
|
||||
endif()
|
||||
|
||||
@ -12,7 +12,7 @@ add_subdirectory(core)
|
||||
add_subdirectory(common)
|
||||
add_subdirectory(player)
|
||||
|
||||
if(NOT WOMBAT_BUILD_TYPE STREQUAL "GBA")
|
||||
if(NOT NOSTALGIA_BUILD_TYPE STREQUAL "GBA")
|
||||
add_subdirectory(tools)
|
||||
add_subdirectory(studio)
|
||||
endif()
|
||||
|
@ -1,13 +1,13 @@
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
|
||||
if(WOMBAT_BUILD_TYPE STREQUAL "GBA")
|
||||
if(NOSTALGIA_BUILD_TYPE STREQUAL "GBA")
|
||||
enable_language(C ASM)
|
||||
set(
|
||||
CPP
|
||||
gba/gfx.cpp
|
||||
gba/media.cpp
|
||||
)
|
||||
elseif(WOMBAT_BUILD_TYPE STREQUAL "Native")
|
||||
elseif(NOSTALGIA_BUILD_TYPE STREQUAL "Native")
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
@ -23,7 +23,7 @@ add_library(
|
||||
core.cpp
|
||||
)
|
||||
|
||||
if(WOMBAT_BUILD_TYPE STREQUAL "Native")
|
||||
if(NOSTALGIA_BUILD_TYPE STREQUAL "Native")
|
||||
add_subdirectory(studio)
|
||||
endif()
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
|
||||
if(WOMBAT_BUILD_TYPE STREQUAL "Native")
|
||||
if(NOSTALGIA_BUILD_TYPE STREQUAL "Native")
|
||||
add_library(
|
||||
NostalgiaCore-Studio SHARED
|
||||
import_tilesheet_wizard.cpp
|
||||
@ -17,5 +17,16 @@ target_link_libraries(
|
||||
OxStd
|
||||
)
|
||||
|
||||
install(TARGETS NostalgiaCore-Studio
|
||||
LIBRARY DESTINATION lib/nostalgia)
|
||||
install(
|
||||
TARGETS
|
||||
NostalgiaCore-Studio
|
||||
LIBRARY DESTINATION
|
||||
lib/nostalgia
|
||||
)
|
||||
|
||||
install(
|
||||
FILES
|
||||
charset.png
|
||||
DESTINATION
|
||||
share/core
|
||||
)
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.2 KiB |
@ -14,7 +14,7 @@ if(COMMAND OBJCOPY_FILE)
|
||||
COMPILER_FLAGS "-mthumb -mthumb-interwork"
|
||||
)
|
||||
|
||||
OBJCOPY_FILE(../../../nostalgia)
|
||||
OBJCOPY_FILE(nostalgia)
|
||||
#PADBIN_FILE(nostalgia)
|
||||
endif()
|
||||
|
||||
@ -26,6 +26,7 @@ target_link_libraries(
|
||||
)
|
||||
|
||||
add_custom_target("nostalgia.bin")
|
||||
|
||||
install(
|
||||
TARGETS
|
||||
nostalgia
|
||||
@ -33,3 +34,12 @@ install(
|
||||
bin
|
||||
)
|
||||
|
||||
if (NOSTALGIA_BUILD_TYPE STREQUAL "GBA")
|
||||
install(
|
||||
FILES
|
||||
nostalgia.bin
|
||||
DESTINATION
|
||||
bin
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -27,7 +27,6 @@ target_link_libraries(
|
||||
install(
|
||||
FILES
|
||||
nostalgia-studio.json
|
||||
nostalgia_rom.oxfs
|
||||
DESTINATION
|
||||
share
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user