diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt new file mode 100644 index 00000000..96520539 --- /dev/null +++ b/samples/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.2) +project(samples) +include("${WUT_ROOT}/share/wut.cmake" REQUIRED) + +add_subdirectory(helloworld) +add_subdirectory(helloworld_std_thread) diff --git a/samples/helloworld/CMakeLists.txt b/samples/helloworld/CMakeLists.txt index 4e228960..c5bc994c 100644 --- a/samples/helloworld/CMakeLists.txt +++ b/samples/helloworld/CMakeLists.txt @@ -1,14 +1,18 @@ cmake_minimum_required(VERSION 3.2) -project(helloworld) +project(helloworld C) include("${WUT_ROOT}/share/wut.cmake" REQUIRED) -add_executable(helloworld main.cpp) +add_executable(helloworld + main.c) + target_link_libraries(helloworld whb defaultheap coreinit proc_ui sysapp) + wut_create_rpx(helloworld.rpx helloworld) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/helloworld.rpx DESTINATION "${CMAKE_INSTALL_PREFIX}") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/helloworld.rpx" + DESTINATION "${CMAKE_INSTALL_PREFIX}") diff --git a/samples/helloworld/main.cpp b/samples/helloworld/main.c similarity index 100% rename from samples/helloworld/main.cpp rename to samples/helloworld/main.c