diff --git a/samples/cmake/curl/CMakeLists.txt b/samples/cmake/curl/CMakeLists.txt index 4a01ddb..7275a91 100644 --- a/samples/cmake/curl/CMakeLists.txt +++ b/samples/cmake/curl/CMakeLists.txt @@ -12,7 +12,7 @@ target_link_libraries(curl nsysnet nlibcurl) -wut_create_rpx(curl.rpx curl) +wut_create_rpx(curl) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/curl.rpx" DESTINATION "${CMAKE_INSTALL_PREFIX}") diff --git a/samples/cmake/custom_default_heap/CMakeLists.txt b/samples/cmake/custom_default_heap/CMakeLists.txt index be74782..d4c2c5c 100644 --- a/samples/cmake/custom_default_heap/CMakeLists.txt +++ b/samples/cmake/custom_default_heap/CMakeLists.txt @@ -6,7 +6,7 @@ add_executable(custom_default_heap main.c) wut_add_exports(custom_default_heap exports.def) -wut_create_rpx(custom_default_heap.rpx custom_default_heap) +wut_create_rpx(custom_default_heap) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/custom_default_heap.rpx" DESTINATION "${CMAKE_INSTALL_PREFIX}") diff --git a/samples/cmake/gx2_triangle/CMakeLists.txt b/samples/cmake/gx2_triangle/CMakeLists.txt index 1722b95..af2763c 100644 --- a/samples/cmake/gx2_triangle/CMakeLists.txt +++ b/samples/cmake/gx2_triangle/CMakeLists.txt @@ -5,7 +5,7 @@ include("${DEVKITPRO}/wut/share/wut.cmake" REQUIRED) add_executable(gx2_triangle main.c) -wut_create_rpx(gx2_triangle.rpx gx2_triangle) +wut_create_rpx(gx2_triangle) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gx2_triangle.rpx" DESTINATION "${CMAKE_INSTALL_PREFIX}") diff --git a/samples/cmake/helloworld/CMakeLists.txt b/samples/cmake/helloworld/CMakeLists.txt index e8a9105..3040aeb 100644 --- a/samples/cmake/helloworld/CMakeLists.txt +++ b/samples/cmake/helloworld/CMakeLists.txt @@ -5,7 +5,7 @@ include("${DEVKITPRO}/wut/share/wut.cmake" REQUIRED) add_executable(helloworld main.c) -wut_create_rpx(helloworld.rpx helloworld) +wut_create_rpx(helloworld) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/helloworld.rpx" DESTINATION "${CMAKE_INSTALL_PREFIX}") diff --git a/samples/cmake/helloworld_cpp/CMakeLists.txt b/samples/cmake/helloworld_cpp/CMakeLists.txt index 12e385a..e774ad9 100644 --- a/samples/cmake/helloworld_cpp/CMakeLists.txt +++ b/samples/cmake/helloworld_cpp/CMakeLists.txt @@ -5,8 +5,7 @@ include("${DEVKITPRO}/wut/share/wut.cmake" REQUIRED) add_executable(helloworld_cpp main.cpp) -wut_create_rpx(helloworld_cpp.rpx - helloworld_cpp) +wut_create_rpx(helloworld_cpp) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/helloworld_cpp.rpx" DESTINATION "${CMAKE_INSTALL_PREFIX}") diff --git a/samples/cmake/my_first_rpl/CMakeLists.txt b/samples/cmake/my_first_rpl/CMakeLists.txt index 3e56704..e1dc215 100644 --- a/samples/cmake/my_first_rpl/CMakeLists.txt +++ b/samples/cmake/my_first_rpl/CMakeLists.txt @@ -6,7 +6,7 @@ add_executable(my_first_rpl my_first_rpl.c) wut_add_exports(my_first_rpl exports.def) -wut_create_rpl(my_first_rpl.rpl my_first_rpl) +wut_create_rpl(my_first_rpl) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/my_first_rpl.rpl" DESTINATION "${CMAKE_INSTALL_PREFIX}") diff --git a/samples/cmake/swkbd/CMakeLists.txt b/samples/cmake/swkbd/CMakeLists.txt index 2629d63..4541ebe 100644 --- a/samples/cmake/swkbd/CMakeLists.txt +++ b/samples/cmake/swkbd/CMakeLists.txt @@ -5,7 +5,7 @@ include("${DEVKITPRO}/wut/share/wut.cmake" REQUIRED) add_executable(swkbd main.cpp) -wut_create_rpx(swkbd_sample.rpx swkbd) +wut_create_rpx(swkbd) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/swkbd_sample.rpx" +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/swkbd.rpx" DESTINATION "${CMAKE_INSTALL_PREFIX}") diff --git a/share/wut.cmake b/share/wut.cmake index ab23f6b..d2bedfc 100644 --- a/share/wut.cmake +++ b/share/wut.cmake @@ -21,7 +21,7 @@ macro(wut_default_malloc target) endmacro() # Generates ${target}_exports.s from an exports file and adds it to the build -macro(wut_add_exports target exports_file) +function(wut_add_exports target exports_file) set(RPL_EXPORTS_FILE ${exports_file}) if(NOT IS_ABSOLUTE ${exports_file}) set(RPL_EXPORTS_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${exports_file}") @@ -36,7 +36,7 @@ macro(wut_add_exports target exports_file) target_sources(${target} PRIVATE ${RPL_EXPORT_GEN_OUTPUT}) set_source_files_properties(${RPL_EXPORT_GEN_OUTPUT} PROPERTIES LANGUAGE C) -endmacro() +endfunction() function(wut_create_rpl_deprecated target source) set(RPL_OPTIONS IS_RPX)