From a9cdbd05880014c49fed518c895f01808d7857de Mon Sep 17 00:00:00 2001 From: Richard Knight Date: Mon, 16 Aug 2021 03:39:15 +0100 Subject: update readme --- README.md | 2 +- cmake/Modules/FindCsound.cmake | 56 +++++++++++++++++++++++++++++++----------- 2 files changed, 43 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 478c7bf..bfb0c33 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Aside from the connection opcode, there are three groups available for each to a ## Requirements - Csound libraries - - Cmake + - Cmake >= 2.8.12 - At least one database development library from the three below. Opcodes will support whichever of these databases can be found, which will be indicated when running the initial cmake command. ### MySQL 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 -- cgit v1.2.3