aboutsummaryrefslogtreecommitdiff
path: root/examples/beginner/cppdemo/CMakeLists.txt
diff options
context:
space:
mode:
authorJohn "Lameguy" Wilbert Villamor <lameguy64@gmail.com>2021-10-15 09:22:45 +0800
committerGitHub <noreply@github.com>2021-10-15 09:22:45 +0800
commitdd0f088aaa4c6bf013643be2d1d8621dbffdb000 (patch)
treed848d6ce007d8bb9357c8b99d6a0a39ec41d244e /examples/beginner/cppdemo/CMakeLists.txt
parent9e08d1047fa8deeb3ccb3ce9bb11d69e25a52d56 (diff)
parenteb719a424e6a16fb64209139a32c9f8a7235a929 (diff)
downloadpsn00bsdk-dd0f088aaa4c6bf013643be2d1d8621dbffdb000.tar.gz
Merge pull request #38 from spicyjpeg/cmake
Full CMake support (in place of makefiles)
Diffstat (limited to 'examples/beginner/cppdemo/CMakeLists.txt')
-rw-r--r--examples/beginner/cppdemo/CMakeLists.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/beginner/cppdemo/CMakeLists.txt b/examples/beginner/cppdemo/CMakeLists.txt
new file mode 100644
index 0000000..83f0f0a
--- /dev/null
+++ b/examples/beginner/cppdemo/CMakeLists.txt
@@ -0,0 +1,22 @@
+# PSn00bSDK example CMake script
+# (C) 2021 spicyjpeg - MPL licensed
+
+cmake_minimum_required(VERSION 3.21)
+
+if(NOT DEFINED CMAKE_TOOLCHAIN_FILE AND DEFINED ENV{PSN00BSDK_LIBS})
+ set(CMAKE_TOOLCHAIN_FILE $ENV{PSN00BSDK_LIBS}/cmake/sdk.cmake)
+endif()
+
+project(
+ cppdemo
+ LANGUAGES CXX
+ VERSION 1.0.0
+ DESCRIPTION "PSn00bSDK basic C++ example"
+ HOMEPAGE_URL "http://lameguy64.net/?page=psn00bsdk"
+)
+
+file(GLOB _sources *.cpp)
+psn00bsdk_add_executable(cppdemo STATIC ${_sources})
+#psn00bsdk_add_cd_image(cppdemo_iso cppdemo iso.xml DEPENDS cppdemo)
+
+install(FILES ${PROJECT_BINARY_DIR}/cppdemo.exe DESTINATION .)