summaryrefslogtreecommitdiff
path: root/cmake/InstallStubs.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/InstallStubs.cmake')
-rw-r--r--cmake/InstallStubs.cmake31
1 files changed, 31 insertions, 0 deletions
diff --git a/cmake/InstallStubs.cmake b/cmake/InstallStubs.cmake
new file mode 100644
index 0000000..48ce248
--- /dev/null
+++ b/cmake/InstallStubs.cmake
@@ -0,0 +1,31 @@
+#
+# Copyright (C) 2021 Reiko Asakura. All Rights Reserved.
+#
+# Vita Development Suite Libraries
+#
+
+file(GLOB NIDS_360 "${NIDS_DIR}/360/*.yml")
+file(GLOB NIDS_365 "${NIDS_DIR}/365/*.yml")
+file(GLOB NIDS_OTHER "${NIDS_DIR}/*.yml")
+
+foreach(NID ${NIDS_360})
+ message(STATUS "Generating stubs from ${NID}")
+ execute_process(
+ COMMAND ${VDSUITE_LIBGEN} ${NID} ${CMAKE_INSTALL_PREFIX}/lib/vdsuite
+ )
+endforeach()
+
+foreach(NID ${NIDS_365})
+ message(STATUS "Generating stubs from ${NID}")
+ execute_process(
+ COMMAND ${VDSUITE_LIBGEN} --merge --export-suffix _365 ${NID} ${CMAKE_INSTALL_PREFIX}/lib/vdsuite
+ COMMAND ${VDSUITE_LIBGEN} ${NID} ${CMAKE_INSTALL_PREFIX}/lib/vdsuite/365
+ )
+endforeach()
+
+foreach(NID ${NIDS_OTHER})
+ message(STATUS "Generating stubs from ${NID}")
+ execute_process(
+ COMMAND ${VDSUITE_LIBGEN} ${NID} ${CMAKE_INSTALL_PREFIX}/lib/vdsuite
+ )
+endforeach()