cmake: Fix paths for building outside of Retro68 tree

This commit is contained in:
Wolfgang Thaller 2015-08-26 22:13:21 +02:00
parent d95202ca50
commit bdf3be1d65
3 changed files with 8 additions and 4 deletions

View File

@ -20,6 +20,8 @@ project(Retro)
if(CMAKE_SYSTEM_NAME MATCHES Retro68)
set( REZ_TEMPLATES_PATH ${CMAKE_CURRENT_SOURCE_DIR}/libretro)
include(add_application)
configure_file(cmake/retro68.toolchain.cmake.in cmake/retro68.toolchain.cmake @ONLY)

View File

@ -25,9 +25,9 @@ function(add_application name)
list(APPEND rsrc_files "${CMAKE_CURRENT_BINARY_DIR}/${f}.rsrc.bin")
list(APPEND rez_files "${f}")
elseif(${f} MATCHES "\\.rsrc$")
list(APPEND rsrc_files "${f}")
list(APPEND rsrc_files "${CMAKE_CURRENT_SOURCE_DIR}/${f}")
elseif(${f} MATCHES "\\.rsrc.bin$")
list(APPEND rsrc_files "${f}")
list(APPEND rsrc_files "${CMAKE_CURRENT_SOURCE_DIR}/${f}")
else()
list(APPEND files "${CMAKE_CURRENT_SOURCE_DIR}/${f}")
endif()
@ -66,7 +66,7 @@ function(add_application name)
add_custom_command(
OUTPUT ${name}.bin ${name}.APPL ${name}.dsk
#COMMAND ${MAKE_APPL} ${ARGS_MAKEAPPL_ARGS} -c "${name}.flt" -o "${name}"
COMMAND ${REZ} ${CMAKE_SOURCE_DIR}/libretro/Retro68APPL.r
COMMAND ${REZ} ${REZ_TEMPLATES_PATH}/Retro68APPL.r
-I${REZ_INCLUDE_PATH}
-DFLT_FILE_NAME="\\"${name}.flt\\""
-o "${name}.bin" --cc "${name}.dsk" --cc "${name}.APPL"

View File

@ -28,5 +28,7 @@ set( REZ_INCLUDE_PATH "${RETRO68_ROOT}/m68k-unknown-elf/RIncludes" )
set( CMAKE_C_COMPILER "${RETRO68_ROOT}/bin/m68k-unknown-elf-gcc" )
set( CMAKE_CXX_COMPILER "${RETRO68_ROOT}/bin/m68k-unknown-elf-g++" )
list( APPEND CMAKE_MODULE_PATH "${RETRO68_ROOT}/cmake" )
set( REZ_TEMPLATES_PATH ${REZ_INCLUDE_PATH})
list( APPEND CMAKE_MODULE_PATH "${RETRO68_ROOT}/m68k-unknown-elf/cmake" )
include(add_application)