aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/cmake/flags.cmake
diff options
context:
space:
mode:
authorspicyjpeg <88942473+spicyjpeg@users.noreply.github.com>2021-11-28 18:46:06 +0100
committerspicyjpeg <88942473+spicyjpeg@users.noreply.github.com>2021-11-28 18:46:06 +0100
commit7186b911cc461dbdad9307afd8901be118e20893 (patch)
treed4fe73b268c92345922625329e6a5f43ce914254 /libpsn00b/cmake/flags.cmake
parenta75b3fa4b1a1b882c33f533645ddae75c09dd697 (diff)
downloadpsn00bsdk-7186b911cc461dbdad9307afd8901be118e20893.tar.gz
CMake fixes, psxcd and printf/scanf improvements
Diffstat (limited to 'libpsn00b/cmake/flags.cmake')
-rw-r--r--libpsn00b/cmake/flags.cmake9
1 files changed, 6 insertions, 3 deletions
diff --git a/libpsn00b/cmake/flags.cmake b/libpsn00b/cmake/flags.cmake
index e163e52..249c5b4 100644
--- a/libpsn00b/cmake/flags.cmake
+++ b/libpsn00b/cmake/flags.cmake
@@ -2,9 +2,8 @@
# (C) 2021 spicyjpeg - MPL licensed
# This script creates several "virtual" targets (psn00bsdk_*) that set include
-# directories and compiler flags when a target is linked against them.
-#
-# The following targets are currently defined:
+# directories and compiler flags when a target is linked against them. The
+# following targets are currently defined:
# - psn00bsdk_common
# - psn00bsdk_object_lib (same as psn00bsdk_common)
# - psn00bsdk_static_exe
@@ -16,6 +15,8 @@
# NOTE: building a static library and linking it as part of a DLL is currently
# *not* supported.
+if(NOT TARGET psn00bsdk_common) # Include guard
+
add_library(psn00bsdk_common INTERFACE)
foreach(
@@ -146,3 +147,5 @@ target_link_options(
)
target_link_libraries(psn00bsdk_module_lib INTERFACE psn00bsdk_shared_lib)
+
+endif()