wut.cmake: Use wut.specs and libwut in wut_create_rpx

This commit is contained in:
Ash Logan 2019-04-23 20:39:58 +10:00
parent 4828abdc1a
commit d542fdc438
2 changed files with 6 additions and 8 deletions

View File

@ -45,18 +45,16 @@ function(wut_create_rpl target source)
cmake_parse_arguments(RPL "${RPL_OPTIONS}" "${RPL_SINGLE_ARGS}" "${RPL_MULTI_ARGS}" "${ARGN}") cmake_parse_arguments(RPL "${RPL_OPTIONS}" "${RPL_SINGLE_ARGS}" "${RPL_MULTI_ARGS}" "${ARGN}")
if(RPL_IS_RPX) if(RPL_IS_RPX)
target_link_libraries(${source} set_property(TARGET ${source} APPEND_STRING PROPERTY
coreinit LINK_FLAGS "-specs=${WUT_ROOT}/share/rpx.specs")
wutcrt)
else() else()
set(ELF2RPL_FLAGS ${ELF2RPL_FLAGS} --rpl) set(ELF2RPL_FLAGS ${ELF2RPL_FLAGS} --rpl)
target_link_libraries(${source} set_property(TARGET ${source} APPEND_STRING PROPERTY
coreinit LINK_FLAGS "-specs=${WUT_ROOT}/share/rpl.specs")
wutcrtrpl)
endif() endif()
target_link_libraries(${source} target_link_libraries(${source}
coreinit) wut)
add_custom_target(${target} ALL add_custom_target(${target} ALL
COMMAND ${CMAKE_STRIP} -g ${source} COMMAND ${CMAKE_STRIP} -g ${source}

View File

@ -53,7 +53,7 @@ set(WUT_C_FLAGS "-mcpu=750 -meabi -mhard-float -Wl,-q -D__WIIU__ -D__
set(CMAKE_C_FLAGS "${WUT_C_FLAGS}" CACHE STRING "") set(CMAKE_C_FLAGS "${WUT_C_FLAGS}" CACHE STRING "")
set(CMAKE_CXX_FLAGS "${WUT_C_FLAGS}" CACHE STRING "") set(CMAKE_CXX_FLAGS "${WUT_C_FLAGS}" CACHE STRING "")
set(CMAKE_ASM_FLAGS "${WUT_C_FLAGS}" CACHE STRING "") set(CMAKE_ASM_FLAGS "${WUT_C_FLAGS}" CACHE STRING "")
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-z,nocopyreloc -T \"${WUT_ROOT}/share/wut.ld\" \"-L${WUT_ROOT}/lib\"" CACHE STRING "") set(CMAKE_EXE_LINKER_FLAGS "\"-L${WUT_ROOT}/lib\" \"-L${WUT_ROOT}/lib/stubs\" -specs=${WUT_ROOT}/share/wut.specs" CACHE STRING "")
# Setup root to exclude host system headers + libraries # Setup root to exclude host system headers + libraries
set(CMAKE_FIND_ROOT_PATH "${DEVKITPPC}" "${DEVKITPRO}/tools" "${DEVKITPRO}/portlibs/wiiu" "${DEVKITPRO}/portlibs/ppc" "${WUT_ROOT}/share") set(CMAKE_FIND_ROOT_PATH "${DEVKITPPC}" "${DEVKITPRO}/tools" "${DEVKITPRO}/portlibs/wiiu" "${DEVKITPRO}/portlibs/ppc" "${WUT_ROOT}/share")