2018-05-23 00:08:13 +02:00
|
|
|
cmake_minimum_required(VERSION 3.2)
|
|
|
|
|
2018-05-27 13:12:49 +02:00
|
|
|
macro(wut_enable_newlib target)
|
|
|
|
set_property(TARGET ${target}
|
|
|
|
APPEND_STRING PROPERTY
|
|
|
|
LINK_FLAGS " -Wl,--whole-archive -lwutnewlib -Wl,--no-whole-archive")
|
|
|
|
endmacro(wut_enable_newlib)
|
|
|
|
|
|
|
|
macro(wut_enable_devoptab target)
|
|
|
|
set_property(TARGET ${target}
|
|
|
|
APPEND_STRING PROPERTY
|
|
|
|
LINK_FLAGS " -Wl,--whole-archive -lwutdevoptab -Wl,--no-whole-archive")
|
|
|
|
endmacro(wut_enable_devoptab)
|
|
|
|
|
2018-05-25 18:21:59 +02:00
|
|
|
macro(wut_enable_stdcpp target)
|
|
|
|
target_link_libraries(${target}
|
2018-05-27 13:12:49 +02:00
|
|
|
stdc++)
|
|
|
|
|
|
|
|
set_property(TARGET ${target}
|
|
|
|
APPEND_STRING PROPERTY
|
|
|
|
COMPILE_FLAGS "-std=c++17")
|
2018-05-25 18:21:59 +02:00
|
|
|
|
2018-05-27 13:12:49 +02:00
|
|
|
set_property(TARGET ${target}
|
|
|
|
APPEND_STRING PROPERTY
|
|
|
|
LINK_FLAGS " -Wl,--whole-archive -lwutstdc++ -Wl,--no-whole-archive")
|
2018-05-25 18:21:59 +02:00
|
|
|
endmacro(wut_enable_stdcpp)
|
|
|
|
|
2018-05-23 00:08:13 +02:00
|
|
|
macro(wut_create_rpx target source)
|
2018-05-25 12:31:38 +02:00
|
|
|
target_link_libraries(${source}
|
2018-05-27 13:12:49 +02:00
|
|
|
wutnewlib
|
|
|
|
coreinit)
|
2018-05-25 12:31:38 +02:00
|
|
|
|
|
|
|
add_custom_target(${target} ALL
|
2018-05-27 13:12:49 +02:00
|
|
|
COMMAND ${WUT_ELF2RPL} ${source} ${target}
|
|
|
|
DEPENDS ${source}
|
|
|
|
COMMENT "Converting to RPX ${target}")
|
2018-05-25 12:31:38 +02:00
|
|
|
|
2018-05-23 00:08:13 +02:00
|
|
|
add_dependencies(${target} ${source})
|
|
|
|
endmacro(wut_create_rpx)
|