@@ -0,0 +1,29 | |||
|
1 | # - Try to find CatalogueAPI Module | |
|
2 | # Once done this will define | |
|
3 | # CATALOGUEAPI_FOUND - System has CatalogueAPI | |
|
4 | # CATALOGUEAPI_INCLUDE_DIRS - The CatalogueAPI include directories | |
|
5 | # CATALOGUEAPI_LIBRARIES - The libraries needed to use CatalogueAPI | |
|
6 | # CATALOGUEAPI_SHARED_LIBRARIES - The shared libraries for CatalogueAPI | |
|
7 | ||
|
8 | set(CATALOGUEAPI_ROOT_DIR "${CATALOGUEAPI_EXTERN_FOLDER}" | |
|
9 | CACHE PATHS | |
|
10 | "Path to the installation of CatalogueAPI" | |
|
11 | ${libRootDirForceValue}) | |
|
12 | ||
|
13 | find_path(CATALOGUEAPI_INCLUDE_DIR CatalogueDao.h | |
|
14 | HINTS ${CATALOGUEAPI_ROOT_DIR} ${CATALOGUEAPI_EXTERN_FOLDER} | |
|
15 | PATH_SUFFIXES src ) | |
|
16 | ||
|
17 | find_library(CATALOGUEAPI_LIBRARY NAMES CatalogueAPI | |
|
18 | HINTS ${CATALOGUEAPI_ROOT_DIR} ${CATALOGUEAPI_EXTERN_FOLDER} | |
|
19 | PATH_SUFFIXES lib) | |
|
20 | ||
|
21 | set(CATALOGUEAPI_LIBRARIES ${CATALOGUEAPI_LIBRARY} ) | |
|
22 | set(CATALOGUEAPI_INCLUDE_DIRS ${CATALOGUEAPI_INCLUDE_DIR} ) | |
|
23 | ||
|
24 | include(FindPackageHandleStandardArgs) | |
|
25 | # handle the QUIETLY and REQUIRED arguments and set CATALOGUEAPI_FOUND to TRUE | |
|
26 | # if all listed variables are TRUE | |
|
27 | find_package_handle_standard_args(CatalogueAPI FOUND_VAR CATALOGUEAPI_FOUND | |
|
28 | REQUIRED_VARS CATALOGUEAPI_LIBRARY CATALOGUEAPI_INCLUDE_DIR) | |
|
29 | mark_as_advanced(CATALOGUEAPI_INCLUDE_DIR CATALOGUEAPI_LIBRARY ) |
@@ -13,6 +13,13 FIND_PACKAGE(Qt5Test REQUIRED) | |||
|
13 | 13 | FIND_PACKAGE(Qt5Gui REQUIRED) |
|
14 | 14 | |
|
15 | 15 | # |
|
16 | # CatalogueAPI | |
|
17 | # | |
|
18 | LIST( APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") | |
|
19 | FIND_PACKAGE(CatalogueAPI) | |
|
20 | ||
|
21 | ||
|
22 | # | |
|
16 | 23 | # doxygen tools |
|
17 | 24 | # |
|
18 | 25 | FIND_PACKAGE(Doxygen) |
@@ -45,6 +45,12 set_property(TARGET ${SQPCORE_LIBRARY_NAME} PROPERTY CXX_STANDARD_REQUIRED ON) | |||
|
45 | 45 | TARGET_LINK_LIBRARIES(${SQPCORE_LIBRARY_NAME}) |
|
46 | 46 | qt5_use_modules(${SQPCORE_LIBRARY_NAME} Core Network) |
|
47 | 47 | |
|
48 | # Find CATALOGUE_API | |
|
49 | if(CATALOGUEAPI_FOUND) | |
|
50 | include_directories("${CATALOGUEAPI_INCLUDE_DIRS}") | |
|
51 | TARGET_LINK_LIBRARIES(${SQPCORE_LIBRARY_NAME} ${CATALOGUEAPI_LIBRARIES}) | |
|
52 | endif() | |
|
53 | ||
|
48 | 54 | INSTALL(TARGETS ${SQPCORE_LIBRARY_NAME} |
|
49 | 55 | RUNTIME DESTINATION ${INSTALL_BINARY_DIR} |
|
50 | 56 | LIBRARY DESTINATION ${INSTALL_LIBRARY_DIR} |
General Comments 0
You need to be logged in to leave comments.
Login now