aboutsummaryrefslogtreecommitdiff
path: root/cmake/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Modules')
-rw-r--r--cmake/Modules/FindCsound.cmake29
-rw-r--r--cmake/Modules/FindMySQL.cmake68
-rw-r--r--cmake/Modules/FindPQXX.cmake33
-rw-r--r--cmake/Modules/FindSqlite3.cmake37
4 files changed, 167 insertions, 0 deletions
diff --git a/cmake/Modules/FindCsound.cmake b/cmake/Modules/FindCsound.cmake
new file mode 100644
index 0000000..e55b269
--- /dev/null
+++ b/cmake/Modules/FindCsound.cmake
@@ -0,0 +1,29 @@
+# Try to find the Csound library.
+# Once done this will define:
+# CSOUND_FOUND - System has the Csound library
+# 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")
+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")
+else()
+find_library(CSOUND_LIBRARY NAMES csound64 csound)
+endif()
+
+include(FindPackageHandleStandardArgs)
+# handle the QUIETLY and REQUIRED arguments and set CSOUND_FOUND to TRUE
+# if all listed variables are TRUE
+find_package_handle_standard_args(CSOUND
+ CSOUND_LIBRARY CSOUND_INCLUDE_DIR)
+mark_as_advanced(CSOUND_INCLUDE_DIR CSOUND_LIBRARY)
+
+set(CSOUND_INCLUDE_DIRS ${CSOUND_INCLUDE_DIR})
+set(CSOUND_LIBRARIES ${CSOUND_LIBRARY} )
diff --git a/cmake/Modules/FindMySQL.cmake b/cmake/Modules/FindMySQL.cmake
new file mode 100644
index 0000000..08f536a
--- /dev/null
+++ b/cmake/Modules/FindMySQL.cmake
@@ -0,0 +1,68 @@
+# - Try to find Mysql-Connector-C++
+# Once done, this will define
+#
+# MYSQLCONNECTORCPP_FOUND - system has Mysql-Connector-C++ installed
+# MYSQLCONNECTORCPP_INCLUDE_DIRS - the Mysql-Connector-C++ include directories
+# MYSQLCONNECTORCPP_LIBRARIES - link these to use Mysql-Connector-C++
+#
+# The user may wish to set, in the CMake GUI or otherwise, this variable:
+# MYSQLCONNECTORCPP_ROOT_DIR - path to start searching for the module
+
+set(MYSQLCONNECTORCPP_ROOT_DIR
+ "${MYSQLCONNECTORCPP_ROOT_DIR}"
+ CACHE
+ PATH
+ "Where to start looking for this component.")
+
+if(WIN32)
+ find_path(MYSQLCONNECTORCPP_INCLUDE_DIR
+ NAMES
+ mysql_connection.h
+ PATHS
+ "C:\\Program Files"
+ HINTS
+ ${MYSQLCONNECTORCPP_ROOT_DIR}
+ PATH_SUFFIXES
+ include)
+
+ find_library(MYSQLCONNECTORCPP_LIBRARY
+ NAMES
+ mysqlcppconn
+ mysqlcppconn-static
+ HINTS
+ ${MYSQLCONNECTORCPP_ROOT_DIR}
+ PATH_SUFFIXES
+ lib)
+
+else()
+ find_path(MYSQLCONNECTORCPP_INCLUDE_DIR
+ mysql_connection.h
+ HINTS
+ ${MYSQLCONNECTORCPP_ROOT_DIR}
+ PATH_SUFFIXES
+ include)
+
+ find_library(MYSQLCONNECTORCPP_LIBRARY
+ NAMES
+ mysqlcppconn
+ mysqlcppconn-static
+ HINTS
+ ${MYSQLCONNECTORCPP_ROOT_DIR}
+ PATH_SUFFIXES
+ lib64
+ lib)
+endif()
+
+mark_as_advanced(MYSQLCONNECTORCPP_INCLUDE_DIR MYSQLCONNECTORCPP_LIBRARY)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(MysqlConnectorCpp
+ DEFAULT_MSG
+ MYSQLCONNECTORCPP_INCLUDE_DIR
+ MYSQLCONNECTORCPP_LIBRARY)
+
+if(MYSQLCONNECTORCPP_FOUND)
+ set(MYSQLCONNECTORCPP_INCLUDE_DIRS "${MYSQLCONNECTORCPP_INCLUDE_DIR}") # Add any dependencies here
+ set(MYSQLCONNECTORCPP_LIBRARIES "${MYSQLCONNECTORCPP_LIBRARY}") # Add any dependencies here
+ mark_as_advanced(MYSQLCONNECTORCPP_ROOT_DIR)
+endif() \ No newline at end of file
diff --git a/cmake/Modules/FindPQXX.cmake b/cmake/Modules/FindPQXX.cmake
new file mode 100644
index 0000000..724079b
--- /dev/null
+++ b/cmake/Modules/FindPQXX.cmake
@@ -0,0 +1,33 @@
+# - Find libpqxx
+# Find the libpqxx includes and client library
+# This module defines
+# PQXX_INCLUDE_DIRS
+# PQXX_LIBRARIES
+# PQXX_FOUND
+
+include (FindPackageHandleStandardArgs)
+
+find_path (PQXX_INCLUDE_DIRS
+ NAME
+ pqxx
+ PATHS
+ /usr/include
+ /usr/local/include
+ PATH_SUFFIXES
+ pqxx
+ DOC
+ "Directory for pqxx headers"
+)
+
+find_library (PQXX_LIBRARIES
+ NAMES
+ pqxx
+)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS("PQXX"
+ "libpqxx couldn't be found"
+ PQXX_LIBRARIES
+ PQXX_INCLUDE_DIRS
+)
+
+mark_as_advanced (PQXX_INCLUDE_DIR PQXX_LIBRARY) \ No newline at end of file
diff --git a/cmake/Modules/FindSqlite3.cmake b/cmake/Modules/FindSqlite3.cmake
new file mode 100644
index 0000000..9c99ae5
--- /dev/null
+++ b/cmake/Modules/FindSqlite3.cmake
@@ -0,0 +1,37 @@
+# Copyright (C) 2007-2009 LuaDist.
+# Created by Peter Kapec <kapecp@gmail.com>
+# Redistribution and use of this file is allowed according to the terms of the MIT license.
+# For details see the COPYRIGHT file distributed with LuaDist.
+# Note:
+# Searching headers and libraries is very simple and is NOT as powerful as scripts
+# distributed with CMake, because LuaDist defines directories to search for.
+# Everyone is encouraged to contact the author with improvements. Maybe this file
+# becomes part of CMake distribution sometimes.
+
+# - Find sqlite3
+# Find the native SQLITE3 headers and libraries.
+#
+# SQLITE3_INCLUDE_DIRS - where to find sqlite3.h, etc.
+# SQLITE3_LIBRARIES - List of libraries when using sqlite.
+# SQLITE3_FOUND - True if sqlite found.
+
+# Look for the header file.
+FIND_PATH(SQLITE3_INCLUDE_DIR NAMES sqlite3.h)
+
+# Look for the library.
+FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3)
+
+# Handle the QUIETLY and REQUIRED arguments and set SQLITE3_FOUND to TRUE if all listed variables are TRUE.
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(SQLITE3 DEFAULT_MSG SQLITE3_LIBRARY SQLITE3_INCLUDE_DIR)
+
+# Copy the results to the output variables.
+IF(SQLITE3_FOUND)
+ SET(SQLITE3_LIBRARIES ${SQLITE3_LIBRARY})
+ SET(SQLITE3_INCLUDE_DIRS ${SQLITE3_INCLUDE_DIR})
+ELSE(SQLITE3_FOUND)
+ SET(SQLITE3_LIBRARIES)
+ SET(SQLITE3_INCLUDE_DIRS)
+ENDIF(SQLITE3_FOUND)
+
+MARK_AS_ADVANCED(SQLITE3_INCLUDE_DIRS SQLITE3_LIBRARIES)