aboutsummaryrefslogtreecommitdiff
path: root/cmake/Modules
diff options
context:
space:
mode:
authorRichard Knight <q@1bpm.net>2021-08-16 03:36:25 +0100
committerRichard Knight <q@1bpm.net>2021-08-16 03:36:25 +0100
commit7f1ce461f30ab17cf244516e5ce6c7578fb22670 (patch)
tree47a58f561443b2dc8931df04c7aa29bf537c175e /cmake/Modules
parentd1970a13fa092b4ddb5dcaa3dd2d3c7d9108c1cb (diff)
downloadcsound-festival-master.tar.gz
csound-festival-master.tar.bz2
csound-festival-master.zip
update readmeHEADmaster
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