Commit 3d007f4f9c4de32ed418b21ef4c51e388bb63547

Sascha Cunz 2012-12-18T18:55:23

DRY: Scan for regex.c only in one place

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aac6f4b..39dfbdc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,12 +52,10 @@ ENDIF()
 
 IF (NOT WIN32)
 	FIND_PACKAGE(ZLIB)
-	IF (CMAKE_SYSTEM_NAME STREQUAL "AmigaOS")
-		INCLUDE_DIRECTORIES(deps/regex)
-		SET(SRC_REGEX deps/regex/regex.c)
-	ENDIF()
-ELSE()
-	# Windows doesn't understand POSIX regex on its own
+ENDIF()
+
+# Include POSIX regex when it is required
+IF(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "AmigaOS")
 	INCLUDE_DIRECTORIES(deps/regex)
 	SET(SRC_REGEX deps/regex/regex.c)
 ENDIF()