From a9abdd3e09a763af4e030c51816e9944789e3516 Mon Sep 17 00:00:00 2001 From: James Benton Date: Fri, 25 May 2018 17:23:11 +0100 Subject: [PATCH] Add a samples root CMakeLists.txt --- samples/CMakeLists.txt | 6 ++++++ samples/helloworld/CMakeLists.txt | 10 +++++++--- samples/helloworld/{main.cpp => main.c} | 0 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 samples/CMakeLists.txt rename samples/helloworld/{main.cpp => main.c} (100%) 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