cmake: Add libwut as a standard library

https://gitlab.kitware.com/cmake/cmake/issues/18222
This commit is contained in:
Ash Logan 2019-05-03 17:48:59 +10:00
parent 6e08d7791e
commit 5087ca6c88
2 changed files with 6 additions and 4 deletions

View File

@ -53,9 +53,6 @@ function(wut_create_rpl target source)
LINK_FLAGS "-specs=${WUT_ROOT}/share/rpl.specs")
endif()
target_link_libraries(${source}
wut)
add_custom_target(${target} ALL
COMMAND ${CMAKE_STRIP} -g ${source}
COMMAND ${WUT_ELF2RPL} ${ELF2RPL_FLAGS} ${source} ${target}

View File

@ -53,7 +53,12 @@ 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_CXX_FLAGS "${WUT_C_FLAGS}" CACHE STRING "")
set(CMAKE_ASM_FLAGS "${WUT_C_FLAGS}" CACHE STRING "")
set(CMAKE_EXE_LINKER_FLAGS "\"-L${WUT_ROOT}/lib\" \"-L${WUT_ROOT}/lib/stubs\" -specs=${WUT_ROOT}/share/wut.specs" CACHE STRING "")
set(CMAKE_EXE_LINKER_FLAGS "\"-L${WUT_ROOT}/lib/stubs\" -specs=${WUT_ROOT}/share/wut.specs" CACHE STRING "")
set(WUT_STANDARD_LIBRARIES "\"${WUT_ROOT}/lib/libwut.a\"")
set(CMAKE_C_STANDARD_LIBRARIES "${WUT_STANDARD_LIBRARIES}" CACHE STRING "")
set(CMAKE_CXX_STANDARD_LIBRARIES "${WUT_STANDARD_LIBRARIES}" CACHE STRING "")
set(CMAKE_ASM_STANDARD_LIBRARIES "${WUT_STANDARD_LIBRARIES}" CACHE STRING "")
# 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")