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)
|
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)
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
||||||
include(address_sanitizer)
|
include(address_sanitizer)
|
||||||
|
|
||||||
if (WOMBAT_BUILD_TYPE STREQUAL "GBA")
|
if(NOSTALGIA_BUILD_TYPE STREQUAL "GBA")
|
||||||
include(GBA)
|
include(GBA)
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-nostdlib
|
-nostdlib
|
||||||
@ -22,8 +23,10 @@ add_definitions(
|
|||||||
-Wsign-compare
|
-Wsign-compare
|
||||||
)
|
)
|
||||||
|
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
if(NOSTALGIA_IDE_BUILD STREQUAL "ON")
|
||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
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_INSTALL_RPATH "$ORIGIN" "$ORIGIN/../lib/nostalgia")
|
||||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
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
|
${DEVKITARM}/bin/padbin 32 build/gba-release/nostalgia.bin
|
||||||
cat build/gba-release/nostalgia.bin media_header.txt nostalgia_media.oxfs > nostalgia.gba
|
cat build/gba-release/nostalgia.bin media_header.txt nostalgia_media.oxfs > nostalgia.gba
|
||||||
|
rm -f media_header.txt
|
||||||
${DEVKITARM}/bin/gbafix nostalgia.gba
|
${DEVKITARM}/bin/gbafix nostalgia.gba
|
||||||
|
@ -10,7 +10,7 @@ BUILD_TYPE=$2
|
|||||||
if [[ $TARGET == windows ]]; then
|
if [[ $TARGET == windows ]]; then
|
||||||
toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/Modules/Mingw.cmake"
|
toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/Modules/Mingw.cmake"
|
||||||
elif [[ $TARGET == gba ]]; then
|
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
|
fi
|
||||||
|
|
||||||
if [[ $BUILD_TYPE == debug ]]; then
|
if [[ $BUILD_TYPE == debug ]]; then
|
||||||
@ -27,6 +27,7 @@ pushd $buildDir
|
|||||||
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
||||||
-DCMAKE_INSTALL_PREFIX="$distDir" \
|
-DCMAKE_INSTALL_PREFIX="$distDir" \
|
||||||
-DCMAKE_INSTALL_RPATH="$project/dist/${TARGET}-${BUILD_TYPE}/lib/nostalgia" \
|
-DCMAKE_INSTALL_RPATH="$project/dist/${TARGET}-${BUILD_TYPE}/lib/nostalgia" \
|
||||||
|
-DNOSTALGIA_IDE_BUILD=OFF \
|
||||||
$buildTypeArgs \
|
$buildTypeArgs \
|
||||||
$toolchain \
|
$toolchain \
|
||||||
$project
|
$project
|
||||||
|
@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.11)
|
|||||||
|
|
||||||
#setup libraries
|
#setup libraries
|
||||||
|
|
||||||
if(NOT WOMBAT_BUILD_TYPE STREQUAL "GBA")
|
if(NOT NOSTALGIA_BUILD_TYPE STREQUAL "GBA")
|
||||||
find_package(Qt5Widgets)
|
find_package(Qt5Widgets)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ add_subdirectory(core)
|
|||||||
add_subdirectory(common)
|
add_subdirectory(common)
|
||||||
add_subdirectory(player)
|
add_subdirectory(player)
|
||||||
|
|
||||||
if(NOT WOMBAT_BUILD_TYPE STREQUAL "GBA")
|
if(NOT NOSTALGIA_BUILD_TYPE STREQUAL "GBA")
|
||||||
add_subdirectory(tools)
|
add_subdirectory(tools)
|
||||||
add_subdirectory(studio)
|
add_subdirectory(studio)
|
||||||
endif()
|
endif()
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
cmake_minimum_required(VERSION 2.8.11)
|
cmake_minimum_required(VERSION 2.8.11)
|
||||||
|
|
||||||
if(WOMBAT_BUILD_TYPE STREQUAL "GBA")
|
if(NOSTALGIA_BUILD_TYPE STREQUAL "GBA")
|
||||||
enable_language(C ASM)
|
enable_language(C ASM)
|
||||||
set(
|
set(
|
||||||
CPP
|
CPP
|
||||||
gba/gfx.cpp
|
gba/gfx.cpp
|
||||||
gba/media.cpp
|
gba/media.cpp
|
||||||
)
|
)
|
||||||
elseif(WOMBAT_BUILD_TYPE STREQUAL "Native")
|
elseif(NOSTALGIA_BUILD_TYPE STREQUAL "Native")
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ add_library(
|
|||||||
core.cpp
|
core.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WOMBAT_BUILD_TYPE STREQUAL "Native")
|
if(NOSTALGIA_BUILD_TYPE STREQUAL "Native")
|
||||||
add_subdirectory(studio)
|
add_subdirectory(studio)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
cmake_minimum_required(VERSION 2.8.11)
|
cmake_minimum_required(VERSION 2.8.11)
|
||||||
|
|
||||||
if(WOMBAT_BUILD_TYPE STREQUAL "Native")
|
if(NOSTALGIA_BUILD_TYPE STREQUAL "Native")
|
||||||
add_library(
|
add_library(
|
||||||
NostalgiaCore-Studio SHARED
|
NostalgiaCore-Studio SHARED
|
||||||
import_tilesheet_wizard.cpp
|
import_tilesheet_wizard.cpp
|
||||||
@ -17,5 +17,16 @@ target_link_libraries(
|
|||||||
OxStd
|
OxStd
|
||||||
)
|
)
|
||||||
|
|
||||||
install(TARGETS NostalgiaCore-Studio
|
install(
|
||||||
LIBRARY DESTINATION lib/nostalgia)
|
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"
|
COMPILER_FLAGS "-mthumb -mthumb-interwork"
|
||||||
)
|
)
|
||||||
|
|
||||||
OBJCOPY_FILE(../../../nostalgia)
|
OBJCOPY_FILE(nostalgia)
|
||||||
#PADBIN_FILE(nostalgia)
|
#PADBIN_FILE(nostalgia)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -26,6 +26,7 @@ target_link_libraries(
|
|||||||
)
|
)
|
||||||
|
|
||||||
add_custom_target("nostalgia.bin")
|
add_custom_target("nostalgia.bin")
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS
|
TARGETS
|
||||||
nostalgia
|
nostalgia
|
||||||
@ -33,3 +34,12 @@ install(
|
|||||||
bin
|
bin
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (NOSTALGIA_BUILD_TYPE STREQUAL "GBA")
|
||||||
|
install(
|
||||||
|
FILES
|
||||||
|
nostalgia.bin
|
||||||
|
DESTINATION
|
||||||
|
bin
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
@ -27,7 +27,6 @@ target_link_libraries(
|
|||||||
install(
|
install(
|
||||||
FILES
|
FILES
|
||||||
nostalgia-studio.json
|
nostalgia-studio.json
|
||||||
nostalgia_rom.oxfs
|
|
||||||
DESTINATION
|
DESTINATION
|
||||||
share
|
share
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user