diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Modules/FindLIBGIT2.cmake | 38 | ||||
-rw-r--r-- | cmake/Modules/FindLibdivecomputer.cmake | 37 | ||||
-rw-r--r-- | cmake/Modules/FindMarble.cmake | 39 | ||||
-rw-r--r-- | cmake/Modules/pkgconfig_helper.cmake | 7 |
4 files changed, 121 insertions, 0 deletions
diff --git a/cmake/Modules/FindLIBGIT2.cmake b/cmake/Modules/FindLIBGIT2.cmake new file mode 100644 index 000000000..6e1193f50 --- /dev/null +++ b/cmake/Modules/FindLIBGIT2.cmake @@ -0,0 +1,38 @@ +# - Try to find the LibGit2 Library +# Once done this will define +# +# LIBGIT2_FOUND - system has LibGit2 +# LIBGIT2_INCLUDE_DIR - the LibGit2 include directory +# LIBGIT2_LIBRARIES +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# + +# in cache already +IF ( LIBGIT2_INCLUDE_DIR AND LIBGIT2_LIBRARIES ) + SET( LIBGIT2_FIND_QUIETLY TRUE ) +ENDIF () + +FIND_PATH( LIBGIT2_INCLUDE_DIR +NAMES git2.h +HINTS + ${CMAKE_CURRENT_SOURCE_DIR}/../install-root/include + ${CMAKE_CURRENT_SOURCE_DIR}/../libgit2/include + /usr/local/include + /usr/include +) + +FIND_LIBRARY( LIBGIT2_LIBRARIES +NAMES + libgit2.a + git2 +HINTS + ${CMAKE_CURRENT_SOURCE_DIR}/../install-root/lib + ${CMAKE_CURRENT_SOURCE_DIR}/../libgit2/build + /usr/local/include + /usr/include +) +SET(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} -lssl -lcrypto) + +INCLUDE( FindPackageHandleStandardArgs ) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( git2 DEFAULT_MSG LIBGIT2_INCLUDE_DIR LIBGIT2_LIBRARIES ) diff --git a/cmake/Modules/FindLibdivecomputer.cmake b/cmake/Modules/FindLibdivecomputer.cmake new file mode 100644 index 000000000..1ab0fc5dc --- /dev/null +++ b/cmake/Modules/FindLibdivecomputer.cmake @@ -0,0 +1,37 @@ +# - Try to find the LIBDIVECOMPUTER Library +# Once done this will define +# +# LIBDIVECOMPUTER_FOUND - system has LIBDIVECOMPUTER +# LIBDIVECOMPUTER_INCLUDE_DIR - the LIBDIVECOMPUTER include directory +# LIBDIVECOMPUTER_LIBRARIES +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# + +# in cache already +IF ( LIBDIVECOMPUTER_INCLUDE_DIR AND LIBDIVECOMPUTER_LIBRARIES ) + SET( LIBDIVECOMPUTER_FIND_QUIETLY TRUE ) +ENDIF ( LIBDIVECOMPUTER_INCLUDE_DIR AND LIBDIVECOMPUTER_LIBRARIES ) + +FIND_PATH( LIBDIVECOMPUTER_INCLUDE_DIR +NAMES libdivecomputer/hw.h +HINTS + ${CMAKE_CURRENT_SOURCE_DIR}/../install-root/include + ${CMAKE_CURRENT_SOURCE_DIR}/../libdivecomputer/include/ + /usr/local/include + /usr/include +) + +FIND_LIBRARY( LIBDIVECOMPUTER_LIBRARIES +NAMES + libdivecomputer.a + divecomputer +HINTS + ${CMAKE_CURRENT_SOURCE_DIR}/../install-root/lib + ${CMAKE_CURRENT_SOURCE_DIR}/../libdivecomputer/src/.libs/ + /usr/local/include + /usr/include +) + +INCLUDE( FindPackageHandleStandardArgs ) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( Libdivecomputer DEFAULT_MSG LIBDIVECOMPUTER_INCLUDE_DIR LIBDIVECOMPUTER_LIBRARIES ) diff --git a/cmake/Modules/FindMarble.cmake b/cmake/Modules/FindMarble.cmake new file mode 100644 index 000000000..b50aeca24 --- /dev/null +++ b/cmake/Modules/FindMarble.cmake @@ -0,0 +1,39 @@ +# - Try to find the Marble Library +# Once done this will define +# +# MARBLE_FOUND - system has Marble +# MARBLE_INCLUDE_DIR - the Marble include directory +# MARBLE_LIBRARIES +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# + +# in cache already +IF ( MARBLE_INCLUDE_DIR AND MARBLE_LIBRARIES ) + SET( MARBLE_FIND_QUIETLY TRUE ) +ENDIF ( MARBLE_INCLUDE_DIR AND MARBLE_LIBRARIES ) + +FIND_PATH( MARBLE_INCLUDE_DIR +NAMES marble/MarbleModel.h +HINTS + ${CMAKE_CURRENT_SOURCE_DIR}/../install-root/include + ${CMAKE_CURRENT_SOURCE_DIR}/../marble/src/lib + ${CMAKE_CURRENT_SOURCE_DIR}/../marble-source/src/lib + /usr/local/include + /usr/include +) + +FIND_LIBRARY( MARBLE_LIBRARIES +NAMES + ssrfmarblewidget + marblewidget +HINTS + ${CMAKE_CURRENT_SOURCE_DIR}/../install-root/lib + ${CMAKE_CURRENT_SOURCE_DIR}/../marble + ${CMAKE_CURRENT_SOURCE_DIR}/../marble-source + /usr/local/include + /usr/include +) + +INCLUDE( FindPackageHandleStandardArgs ) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( marble DEFAULT_MSG MARBLE_INCLUDE_DIR MARBLE_LIBRARIES ) diff --git a/cmake/Modules/pkgconfig_helper.cmake b/cmake/Modules/pkgconfig_helper.cmake new file mode 100644 index 000000000..f53a1064d --- /dev/null +++ b/cmake/Modules/pkgconfig_helper.cmake @@ -0,0 +1,7 @@ +MACRO(pkg_config_library LIBNAME pcfile option) + pkg_check_modules(${LIBNAME} ${option} ${pcfile}) + include_directories(${${LIBNAME}_INCLUDE_DIRS}) + link_directories(${${LIBNAME}_LIBRARY_DIRS}) + add_definitions(${${LIBNAME}_CFLAGS_OTHER}) + set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} ${${LIBNAME}_LIBRARIES}) +ENDMACRO() |