aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-11 00:47:57 -0800
committerChris Robinson <[email protected]>2018-11-11 00:47:57 -0800
commit2db82bea6f10b9cea7cc821fcafa2489f7a44bb5 (patch)
tree1350e00d0d81e308c8aa841f3dbd9bf42caaa857 /CMakeLists.txt
parentf99b16daa9b38cb2da8717be65db29da2fa518af (diff)
Define the examples' common library earlier
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dc3bad12..06a64f88 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1672,6 +1672,11 @@ IF(ALSOFT_TESTS)
ENDIF()
IF(ALSOFT_EXAMPLES)
+ # Add a static library with common functions used by multiple targets
+ ADD_LIBRARY(ex-common STATIC examples/common/alhelpers.c)
+ TARGET_COMPILE_DEFINITIONS(ex-common PRIVATE ${CPP_DEFS})
+ TARGET_COMPILE_OPTIONS(ex-common PRIVATE ${C_FLAGS})
+
ADD_EXECUTABLE(alrecord examples/alrecord.c)
TARGET_COMPILE_DEFINITIONS(alrecord PRIVATE ${CPP_DEFS})
TARGET_COMPILE_OPTIONS(alrecord PRIVATE ${C_FLAGS})
@@ -1689,11 +1694,6 @@ IF(ALSOFT_EXAMPLES)
IF(SDL2_FOUND)
IF(SDL_SOUND_FOUND)
- # Add a static library with common functions used by multiple targets
- ADD_LIBRARY(ex-common STATIC examples/common/alhelpers.c)
- TARGET_COMPILE_DEFINITIONS(ex-common PRIVATE ${CPP_DEFS})
- TARGET_COMPILE_OPTIONS(ex-common PRIVATE ${C_FLAGS})
-
ADD_EXECUTABLE(alplay examples/alplay.c)
TARGET_COMPILE_DEFINITIONS(alplay PRIVATE ${CPP_DEFS})
TARGET_INCLUDE_DIRECTORIES(alplay