aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-08-20 04:30:53 -0700
committerChris Robinson <[email protected]>2017-08-20 04:30:53 -0700
commit55643d6370430a73bbf0c4ce8d7a2e689b9891d9 (patch)
tree86de62cabeab690c13bb2d5cffa9b3152f6b95bf /CMakeLists.txt
parent051828344ecaeff0140034693e3f63355f490e9b (diff)
Use getopt to handle options in makehrtf
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5adfac25..25d66d6b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -652,6 +652,8 @@ int main()
ENDIF()
ENDIF()
+CHECK_SYMBOL_EXISTS(getopt unistd.h HAVE_GETOPT)
+
# Check for a 64-bit type
CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H)
IF(NOT HAVE_STDINT_H)
@@ -1395,6 +1397,9 @@ IF(ALSOFT_UTILS)
TARGET_LINK_LIBRARIES(openal-info OpenAL)
ADD_EXECUTABLE(makehrtf utils/makehrtf.c)
+ IF(NOT HAVE_GETOPT)
+ SET_PROPERTY(TARGET makehrtf APPEND PROPERTY SOURCE utils/getopt.c)
+ ENDIF()
SET_PROPERTY(TARGET makehrtf APPEND PROPERTY COMPILE_FLAGS ${EXTRA_CFLAGS})
IF(HAVE_LIBM)
TARGET_LINK_LIBRARIES(makehrtf m)