aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/Modules/HandleFindMarble.cmake
blob: c812e250dbba2cfbc3a6a2d6f8b2540057f66cc4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# setup marble

if(NOT NO_MARBLE)
	if(LIBMARBLE_FROM_PKGCONFIG)
		pkg_config_library(MARBLE libmarble REQUIRED)
		set(MARBLE_LIBRARIES "")
	else()
		find_package(Marble QUIET)
		if(MARBLE_FOUND)
			include_directories(${MARBLE_INCLUDE_DIR})
		else()
			set(NO_MARBLE ON)
			message(STATUS "building without marble widget support")
			add_definitions(-DNO_MARBLE)
			set(MARBLE_LIBRARIES "")
		endif()
	endif()
	add_custom_target(link_marble_data ALL COMMAND rm -rf ./marbledata && ln -s ${CMAKE_SOURCE_DIR}/marbledata ${CMAKE_BINARY_DIR}/marbledata)
else()
	message(STATUS "building without marble widget support")
	add_definitions(-DNO_MARBLE)
	set(MARBLE_LIBRARIES "")
endif()