File: FindPappsoMSpp.cmake

package info (click to toggle)
libpappsomspp 0.11.11-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 18,904 kB
  • sloc: cpp: 85,485; xml: 44,164; python: 668; sql: 186; makefile: 37; sh: 33
file content (74 lines) | stat: -rw-r--r-- 1,854 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Copyright : Olivier Langella (CNRS)
# License : GPL-3.0+
# Authors : Olivier Langella, Filippo Rusconi

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_DIRS AND PappsoMSpp_LIBRARY)

	mark_as_advanced(PappsoMSpp_INCLUDE_DIRS)
	mark_as_advanced(PappsoMSpp_LIBRARY)

	message(STATUS "~~~~~~~~~~~~~ ${PappsoMSpp_LIBRARY} ~~~~~~~~~~~~~~~")

	set(PappsoMSpp_FOUND TRUE)

endif()

if(PappsoMSpp_FOUND)

	if(NOT PappsoMSpp_FIND_QUIETLY)
		message(STATUS "Found PappsoMSpp_LIBRARY: ${PappsoMSpp_LIBRARY}")
	endif()

	if(NOT TARGET PappsoMSpp::Core)

		add_library(PappsoMSpp::Core UNKNOWN IMPORTED)

		set_target_properties(PappsoMSpp::Core PROPERTIES
			IMPORTED_LOCATION             "${PappsoMSpp_LIBRARY}"
			INTERFACE_INCLUDE_DIRECTORIES "${PappsoMSpp_INCLUDE_DIRS}")

	endif()

	find_library(PappsoMSppWidget_LIBRARY NAMES pappsomspp-gui)

	if(PappsoMSpp_INCLUDE_DIRS AND PappsoMSppWidget_LIBRARY)

		mark_as_advanced(PappsoMSppWidget_LIBRARY)  

		message(STATUS "~~~~~~~~~~~~~ ${PappsoMSppWidget_LIBRARY} ~~~~~~~~~~~~~~~")

		set(PappsoMSppWidget_FOUND TRUE)

		if(NOT TARGET PappsoMSpp::Widget)

			add_library(PappsoMSpp::Widget UNKNOWN IMPORTED)

			set_target_properties(PappsoMSpp::Widget PROPERTIES
				IMPORTED_LOCATION             "${PappsoMSppWidget_LIBRARY}"
				INTERFACE_INCLUDE_DIRECTORIES "${PappsoMSpp_INCLUDE_DIRS}")

		endif()

	endif()

	if(NOT PappsoMSpp_FIND_QUIETLY)
		message(STATUS "Found PappsoMSppWidget_LIBRARY: ${PappsoMSppWidget_LIBRARY}")
	endif()

else()

	if(PappsoMSpp_FIND_REQUIRED)

		message(FATAL_ERROR "Could not find libpappsomspp. Please do specify the
		PappsoMSpp_INCLUDE_DIRS and PappsoMSpp_LIBRARY variables using cmake!")

	endif()

endif()