aboutsummaryrefslogtreecommitdiff
path: root/cmake/Modules
diff options
context:
space:
mode:
authorRichard Knight <q@1bpm.net>2021-07-21 22:36:54 +0100
committerRichard Knight <q@1bpm.net>2021-07-21 22:36:54 +0100
commitcf0f0faa24b90ceb7095b19f69314059f9304204 (patch)
tree36f4c59352302edcfd682406138548eded092f1d /cmake/Modules
parent2c2b195cdbef7fdd6483d85dbe5234fbaa921f74 (diff)
downloadcsound-sdl-cf0f0faa24b90ceb7095b19f69314059f9304204.tar.gz
csound-sdl-cf0f0faa24b90ceb7095b19f69314059f9304204.tar.bz2
csound-sdl-cf0f0faa24b90ceb7095b19f69314059f9304204.zip
cmake files update
Diffstat (limited to 'cmake/Modules')
-rw-r--r--cmake/Modules/FindCsound.cmake56
1 files changed, 42 insertions, 14 deletions
diff --git a/cmake/Modules/FindCsound.cmake b/cmake/Modules/FindCsound.cmake
index b5631c9..24c90d9 100644
--- a/cmake/Modules/FindCsound.cmake
+++ b/cmake/Modules/FindCsound.cmake
@@ -4,25 +4,53 @@
# CSOUND_INCLUDE_DIRS - The Csound include directories.
# CSOUND_LIBRARIES - The libraries needed to use the Csound library.
-if(APPLE)
- find_path(CSOUND_INCLUDE_DIR csound.h HINTS /Library/Frameworks/CsoundLib64.framework/Headers
- "$ENV{HOME}/Library/Frameworks/CsoundLib64.framework/Headers")
-elseif(WIN32)
- find_path(CSOUND_INCLUDE_DIR csound.h PATH_SUFFIXES csound
+# RKnight 2021-07-21 : quick copy paste hack to deal with 32 bit if not using double
+
+if(USE_DOUBLE)
+ # 64 bit
+ if(APPLE)
+ find_path(CSOUND_INCLUDE_DIR csound.h HINTS /Library/Frameworks/CsoundLib64.framework/Headers
+ "$ENV{HOME}/Library/Frameworks/CsoundLib64.framework/Headers")
+ elseif(WIN32)
+ find_path(CSOUND_INCLUDE_DIR csound.h PATH_SUFFIXES csound
HINTS "c:\\Program Files\\Csound6_x64\\include")
-else()
- find_path(CSOUND_INCLUDE_DIR csound.h PATH_SUFFIXES csound)
-endif()
+ else()
+ find_path(CSOUND_INCLUDE_DIR csound.h PATH_SUFFIXES csound)
+ endif()
+
+ if(APPLE)
+ find_library(CSOUND_LIBRARY NAMES CsoundLib64 HINTS /Library/Frameworks/CsoundLib64.framework/
+ "$ENV{HOME}/Library/Frameworks/CsoundLib64.framework")
+ elseif(WIN32)
+ find_library(CSOUND_LIBRARY NAMES csound64 HINTS "c:\\Program Files\\Csound6_x64\\lib")
+ else()
+ find_library(CSOUND_LIBRARY NAMES csound64 csound)
+ endif()
-if(APPLE)
- find_library(CSOUND_LIBRARY NAMES CsoundLib64 HINTS /Library/Frameworks/CsoundLib64.framework/
- "$ENV{HOME}/Library/Frameworks/CsoundLib64.framework")
-elseif(WIN32)
- find_library(CSOUND_LIBRARY NAMES csound64 HINTS "c:\\Program Files\\Csound6_x64\\lib")
else()
- find_library(CSOUND_LIBRARY NAMES csound64 csound)
+ # 32 bit
+ if(APPLE)
+ find_path(CSOUND_INCLUDE_DIR csound.h HINTS /Library/Frameworks/CsoundLib.framework/Headers
+ "$ENV{HOME}/Library/Frameworks/CsoundLib.framework/Headers")
+ elseif(WIN32)
+ find_path(CSOUND_INCLUDE_DIR csound.h PATH_SUFFIXES csound
+ HINTS "c:\\Program Files (x86)\\Csound6\\include")
+ else()
+ find_path(CSOUND_INCLUDE_DIR csound.h PATH_SUFFIXES csound)
+ endif()
+
+ if(APPLE)
+ find_library(CSOUND_LIBRARY NAMES CsoundLib HINTS /Library/Frameworks/CsoundLib.framework/
+ "$ENV{HOME}/Library/Frameworks/CsoundLib.framework")
+ elseif(WIN32)
+ find_library(CSOUND_LIBRARY NAMES csound HINTS "c:\\Program Files (x86)\\Csound6\\lib")
+ else()
+ find_library(CSOUND_LIBRARY NAMES csound csound)
+ endif()
+
endif()
+
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set CSOUND_FOUND to TRUE
# if all listed variables are TRUE