diff options
author | Lubos Dolezel <lubos@dolezel.info> | 2015-06-01 16:38:53 +0200 |
---|---|---|
committer | Lubos Dolezel <lubos@dolezel.info> | 2015-06-01 16:38:53 +0200 |
commit | 2142a3eaa4c1eb99aa1e4c7d95a4e1115bc4c689 (patch) | |
tree | d5e801c683f59a4471ba9d64f2b22ab7908a8b8b /cmake | |
parent | 545703d60acb8b0245e3d79e5dfd7171ca10c572 (diff) | |
download | twinkle-2142a3eaa4c1eb99aa1e4c7d95a4e1115bc4c689.tar twinkle-2142a3eaa4c1eb99aa1e4c7d95a4e1115bc4c689.tar.gz twinkle-2142a3eaa4c1eb99aa1e4c7d95a4e1115bc4c689.tar.lz twinkle-2142a3eaa4c1eb99aa1e4c7d95a4e1115bc4c689.tar.xz twinkle-2142a3eaa4c1eb99aa1e4c7d95a4e1115bc4c689.zip |
Many submodules building (no gui yet), with link-time errors
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/FindCcrtp.cmake | 17 | ||||
-rw-r--r-- | cmake/FindCommoncpp.cmake | 17 | ||||
-rw-r--r-- | cmake/FindLibMagic.cmake | 74 | ||||
-rw-r--r-- | cmake/FindLibSndfile.cmake | 18 | ||||
-rw-r--r-- | cmake/FindReadline.cmake | 47 | ||||
-rw-r--r-- | cmake/FindUcommon.cmake | 19 |
6 files changed, 192 insertions, 0 deletions
diff --git a/cmake/FindCcrtp.cmake b/cmake/FindCcrtp.cmake new file mode 100644 index 0000000..93a9e31 --- /dev/null +++ b/cmake/FindCcrtp.cmake @@ -0,0 +1,17 @@ +FIND_PATH(CCRTP_INCLUDE_DIR ccrtp/rtp.h) +FIND_LIBRARY(CCRTP_LIBRARIES NAMES ccrtp) + +IF(CCRTP_INCLUDE_DIR AND CCRTP_LIBRARIES) + SET(CCRTP_FOUND TRUE) +ENDIF(CCRTP_INCLUDE_DIR AND CCRTP_LIBRARIES) + +IF(CCRTP_FOUND) + IF (NOT Ccrtp_FIND_QUIETLY) + MESSAGE(STATUS "Found ccrtp includes: ${CCRTP_INCLUDE_DIR}/ccrtp/rtp.h") + MESSAGE(STATUS "Found ccrtp library: ${CCRTP_LIBRARIES}") + ENDIF (NOT Ccrtp_FIND_QUIETLY) +ELSE(CCRTP_FOUND) + IF (Ccrtp_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could NOT find ccrtp development files") + ENDIF (Ccrtp_FIND_REQUIRED) +ENDIF(CCRTP_FOUND) diff --git a/cmake/FindCommoncpp.cmake b/cmake/FindCommoncpp.cmake new file mode 100644 index 0000000..8a83e29 --- /dev/null +++ b/cmake/FindCommoncpp.cmake @@ -0,0 +1,17 @@ +FIND_PATH(COMMONCPP_INCLUDE_DIR commoncpp/config.h) +FIND_LIBRARY(COMMONCPP_LIBRARIES NAMES commoncpp) + +IF(COMMONCPP_INCLUDE_DIR AND COMMONCPP_LIBRARIES) + SET(COMMONCPP_FOUND TRUE) +ENDIF(COMMONCPP_INCLUDE_DIR AND COMMONCPP_LIBRARIES) + +IF(COMMONCPP_FOUND) + IF (NOT Commoncpp_FIND_QUIETLY) + MESSAGE(STATUS "Found commoncpp includes: ${COMMONCPP_INCLUDE_DIR}/commoncpp/config.h") + MESSAGE(STATUS "Found commoncpp library: ${COMMONCPP_LIBRARIES}") + ENDIF (NOT Commoncpp_FIND_QUIETLY) +ELSE(COMMONCPP_FOUND) + IF (Commoncpp_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could NOT find commoncpp development files") + ENDIF (Commoncpp_FIND_REQUIRED) +ENDIF(COMMONCPP_FOUND) diff --git a/cmake/FindLibMagic.cmake b/cmake/FindLibMagic.cmake new file mode 100644 index 0000000..ba0abd6 --- /dev/null +++ b/cmake/FindLibMagic.cmake @@ -0,0 +1,74 @@ +# - Try to find libmagic header and library +# +# Usage of this module as follows: +# +# find_package(LibMagic) +# +# Variables used by this module, they can change the default behaviour and need +# to be set before calling find_package: +# +# LibMagic_ROOT_DIR Set this variable to the root installation of +# libmagic if the module has problems finding the +# proper installation path. +# +# Variables defined by this module: +# +# LIBMAGIC_FOUND System has libmagic, magic.h, and file +# LibMagic_FILE_EXE Path to the 'file' command +# LibMagic_VERSION Version of libmagic +# LibMagic_LIBRARY The libmagic library +# LibMagic_INCLUDE_DIR The location of magic.h + +find_path(LibMagic_ROOT_DIR + NAMES include/magic.h +) + +if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + # the static version of the library is preferred on OS X for the + # purposes of making packages (libmagic doesn't ship w/ OS X) + set(libmagic_names libmagic.a magic) +else () + set(libmagic_names magic) +endif () + +find_file(LibMagic_FILE_EXE + NAMES file + HINTS ${LibMagic_ROOT_DIR}/bin +) + +find_library(LibMagic_LIBRARY + NAMES ${libmagic_names} + HINTS ${LibMagic_ROOT_DIR}/lib +) + +find_path(LibMagic_INCLUDE_DIR + NAMES magic.h + HINTS ${LibMagic_ROOT_DIR}/include +) + +if (LibMagic_FILE_EXE) + execute_process(COMMAND "${LibMagic_FILE_EXE}" --version + ERROR_VARIABLE LibMagic_VERSION + OUTPUT_VARIABLE LibMagic_VERSION) + string(REGEX REPLACE "^file-([0-9.]+).*$" "\\1" + LibMagic_VERSION "${LibMagic_VERSION}") + message(STATUS "libmagic version: ${LibMagic_VERSION}") +else () + set(LibMagic_VERSION NOTFOUND) +endif () + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(LibMagic DEFAULT_MSG + LibMagic_LIBRARY + LibMagic_INCLUDE_DIR + LibMagic_FILE_EXE + LibMagic_VERSION +) + +mark_as_advanced( + LibMagic_ROOT_DIR + LibMagic_FILE_EXE + LibMagic_VERSION + LibMagic_LIBRARY + LibMagic_INCLUDE_DIR +) diff --git a/cmake/FindLibSndfile.cmake b/cmake/FindLibSndfile.cmake new file mode 100644 index 0000000..b333312 --- /dev/null +++ b/cmake/FindLibSndfile.cmake @@ -0,0 +1,18 @@ +FIND_PATH(LIBSNDFILE_INCLUDE_DIR sndfile.h) + +SET(LIBSNDFILE_NAMES ${LIBSNDFILE_NAMES} sndfile) +FIND_LIBRARY(LIBSNDFILE_LIBRARY NAMES ${LIBSNDFILE_NAMES} PATH) + +IF(LIBSNDFILE_INCLUDE_DIR AND LIBSNDFILE_LIBRARY) + SET(LIBSNDFILE_FOUND TRUE) +ENDIF(LIBSNDFILE_INCLUDE_DIR AND LIBSNDFILE_LIBRARY) + +IF(LIBSNDFILE_FOUND) + IF(NOT LibSndfile_FIND_QUIETLY) + MESSAGE(STATUS "Found LibSndfile: ${LIBSNDFILE_LIBRARY}") + ENDIF (NOT LibSndfile_FIND_QUIETLY) +ELSE(LIBSNDFILE_FOUND) + IF(LibSndfile_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find sndfile") + ENDIF(LibSndfile_FIND_REQUIRED) +ENDIF (LIBSNDFILE_FOUND) diff --git a/cmake/FindReadline.cmake b/cmake/FindReadline.cmake new file mode 100644 index 0000000..745cfe5 --- /dev/null +++ b/cmake/FindReadline.cmake @@ -0,0 +1,47 @@ +# - Try to find readline include dirs and libraries +# +# Usage of this module as follows: +# +# find_package(Readline) +# +# Variables used by this module, they can change the default behaviour and need +# to be set before calling find_package: +# +# Readline_ROOT_DIR Set this variable to the root installation of +# readline if the module has problems finding the +# proper installation path. +# +# Variables defined by this module: +# +# READLINE_FOUND System has readline, include and lib dirs found +# Readline_INCLUDE_DIR The readline include directories. +# Readline_LIBRARY The readline library. + +find_path(Readline_ROOT_DIR + NAMES include/readline/readline.h +) + +find_path(Readline_INCLUDE_DIR + NAMES readline/readline.h + HINTS ${Readline_ROOT_DIR}/include +) + +find_library(Readline_LIBRARY + NAMES readline + HINTS ${Readline_ROOT_DIR}/lib +) + +if(Readline_INCLUDE_DIR AND Readline_LIBRARY AND Ncurses_LIBRARY) + set(READLINE_FOUND TRUE) +else(Readline_INCLUDE_DIR AND Readline_LIBRARY AND Ncurses_LIBRARY) + FIND_LIBRARY(Readline_LIBRARY NAMES readline) + include(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG Readline_INCLUDE_DIR Readline_LIBRARY ) + MARK_AS_ADVANCED(Readline_INCLUDE_DIR Readline_LIBRARY) +endif(Readline_INCLUDE_DIR AND Readline_LIBRARY AND Ncurses_LIBRARY) + +mark_as_advanced( + Readline_ROOT_DIR + Readline_INCLUDE_DIR + Readline_LIBRARY +) diff --git a/cmake/FindUcommon.cmake b/cmake/FindUcommon.cmake new file mode 100644 index 0000000..a61257b --- /dev/null +++ b/cmake/FindUcommon.cmake @@ -0,0 +1,19 @@ +FIND_PATH(UCOMMON_INCLUDE_DIR ucommon/ucommon.h) +FIND_LIBRARY(UCOMMON_LIBRARIES NAMES ucommon) +FIND_LIBRARY(USECURE_LIBRARIES NAMES usecure) + +IF(UCOMMON_INCLUDE_DIR AND UCOMMON_LIBRARIES AND USECURE_LIBRARIES) + SET(UCOMMON_FOUND TRUE) + SET(UCOMMON_LIBRARIES ${UCOMMON_LIBRARIES} ${USECURE_LIBRARIES}) +ENDIF(UCOMMON_INCLUDE_DIR AND UCOMMON_LIBRARIES) + +IF(UCOMMON_FOUND) + IF (NOT Ucommon_FIND_QUIETLY) + MESSAGE(STATUS "Found ucommon includes: ${UCOMMON_INCLUDE_DIR}/ucommon/ucommon.h") + MESSAGE(STATUS "Found ucommon library: ${UCOMMON_LIBRARIES}") + ENDIF (NOT Ucommon_FIND_QUIETLY) +ELSE(UCOMMON_FOUND) + IF (Ucommon_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could NOT find ucommon development files") + ENDIF (Ucommon_FIND_REQUIRED) +ENDIF(UCOMMON_FOUND) |