From 65d7bdd3e5d15806ac2a72ecc89adc2502c4602d Mon Sep 17 00:00:00 2001 From: Ash Logan Date: Fri, 3 May 2019 18:08:42 +1000 Subject: [PATCH] cmake: Add libwut to standard include dirs apparently cmake also has a CMAKE__STANDARD_INCLUDE_DIRECTORIES --- share/wut.toolchain.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/share/wut.toolchain.cmake b/share/wut.toolchain.cmake index 89f92f8..5eed56d 100644 --- a/share/wut.toolchain.cmake +++ b/share/wut.toolchain.cmake @@ -49,7 +49,7 @@ set(CMAKE_LINKER "powerpc-eabi-ld" CACHE PATH "") set(CMAKE_AR "powerpc-eabi-ar" CACHE PATH "") set(CMAKE_STRIP "powerpc-eabi-strip" CACHE PATH "") -set(WUT_C_FLAGS "-mcpu=750 -meabi -mhard-float -Wl,-q -D__WIIU__ -D__WUT__ -isystem \"${WUT_ROOT}/include\"") +set(WUT_C_FLAGS "-mcpu=750 -meabi -mhard-float -Wl,-q -D__WIIU__ -D__WUT__") 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 "") @@ -60,6 +60,12 @@ 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 "") +#for some reason cmake (3.14.3) doesn't appreciate having \" here +set(WUT_STANDARD_INCLUDE_DIRECTORIES "${WUT_ROOT}/include") +set(CMAKE_C_STANDARD_INCLUDE_DIRECTORIES "${WUT_STANDARD_INCLUDE_DIRECTORIES}" CACHE STRING "") +set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES "${WUT_STANDARD_INCLUDE_DIRECTORIES}" CACHE STRING "") +set(CMAKE_ASM_STANDARD_INCLUDE_DIRECTORIES "${WUT_STANDARD_INCLUDE_DIRECTORIES}" 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") set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)