Skip to content
Snippets Groups Projects
Commit 77bf9821 authored by Langella Olivier's avatar Langella Olivier
Browse files

rename cmake find pappso script

parent 507cd8ee
No related branches found
No related tags found
No related merge requests found
......@@ -2,16 +2,16 @@
# License : GPL-3.0+
# Authors : Olivier Langella, Filippo Rusconi
find_path(PappsoMSpp_INCLUDE_DIR pappsomspp/types.h
find_path(PappsoMSpp_INCLUDE_DIRS pappsomspp/types.h
PATHS /usr/local/include /usr/include
PATH_SUFFIXES pappsomspp libpappsomspp ENV PATH)
find_library(PappsoMSpp_LIBRARY NAMES pappsomspp)
if(PappsoMSpp_INCLUDE_DIR AND PappsoMSpp_LIBRARY)
if(PappsoMSpp_INCLUDE_DIRS AND PappsoMSpp_LIBRARY)
mark_as_advanced(PappsoMSpp_INCLUDE_DIR)
mark_as_advanced(PappsoMSpp_INCLUDE_DIRS)
mark_as_advanced(PappsoMSpp_LIBRARY)
message(STATUS "~~~~~~~~~~~~~ ${PappsoMSpp_LIBRARY} ~~~~~~~~~~~~~~~")
......@@ -21,7 +21,6 @@ if(PappsoMSpp_INCLUDE_DIR AND PappsoMSpp_LIBRARY)
endif()
if(PappsoMSpp_FOUND)
# show which CppUnit was found only if not quiet
if(NOT PappsoMSpp_FIND_QUIETLY)
message(STATUS "Found PappsoMSpp_LIBRARY: ${PappsoMSpp_LIBRARY}")
......@@ -33,44 +32,42 @@ if(PappsoMSpp_FOUND)
set_target_properties(PappsoMSpp::Core PROPERTIES
IMPORTED_LOCATION "${PappsoMSpp_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${PappsoMSpp_INCLUDE_DIR}")
INTERFACE_INCLUDE_DIRECTORIES "${PappsoMSpp_INCLUDE_DIRS}")
endif()
find_library(PappsoMSpp_WIDGET_LIBRARY NAMES pappsomspp-widget)
find_library(PappsoMSppWidget_LIBRARY NAMES pappsomspp-widget)
if(PappsoMSpp_INCLUDE_DIR AND PappsoMSpp_WIDGET_LIBRARY)
if(PappsoMSpp_INCLUDE_DIRS AND PappsoMSppWidget_LIBRARY)
mark_as_advanced(PappsoMSpp_WIDGET_LIBRARY)
mark_as_advanced(PappsoMSppWidget_LIBRARY)
message(STATUS "~~~~~~~~~~~~~ ${PappsoMSpp_WIDGET_LIBRARY} ~~~~~~~~~~~~~~~")
message(STATUS "~~~~~~~~~~~~~ ${PappsoMSppWidget_LIBRARY} ~~~~~~~~~~~~~~~")
set(PappsoMSpp_WIDGET_FOUND TRUE)
set(PappsoMSppWidget_FOUND TRUE)
if(NOT TARGET PappsoMSpp::Widget)
add_library(PappsoMSpp::Widget UNKNOWN IMPORTED)
set_target_properties(PappsoMSpp::Widget PROPERTIES
IMPORTED_LOCATION "${PappsoMSpp_WIDGET_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${PappsoMSpp_INCLUDE_DIR}")
IMPORTED_LOCATION "${PappsoMSppWidget_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${PappsoMSpp_INCLUDE_DIRS}")
endif()
endif()
# show which CppUnit was found only if not quiet
if(NOT PappsoMSpp_FIND_QUIETLY)
message(STATUS "Found PappsoMSpp_WIDGET_LIBRARY: ${PappsoMSpp_WIDGET_LIBRARY}")
message(STATUS "Found PappsoMSppWidget_LIBRARY: ${PappsoMSppWidget_LIBRARY}")
endif()
else()
# fatal error if CppUnit is required but not found
if(PappsoMSpp_FIND_REQUIRED)
message(FATAL_ERROR "Could not find libpappsomspp. Please do specify the
PappsoMSpp_INCLUDE_DIR and PappsoMSpp_LIBRARY variables using cmake!")
PappsoMSpp_INCLUDE_DIRS and PappsoMSpp_LIBRARY variables using cmake!")
endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment