@PACKAGE_INIT@

set(@PROJECT_NAME@_VERSION "@PROJECT_VERSION@")
set_and_check(@PROJECT_NAME@_INSTALL_PREFIX "${PACKAGE_PREFIX_DIR}")
set_and_check(@PROJECT_NAME@_INC_DIR "${PACKAGE_PREFIX_DIR}/include")
set_and_check(@PROJECT_NAME@_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/include")
set_and_check(@PROJECT_NAME@_LIB_DIR "${PACKAGE_PREFIX_DIR}/lib")
set_and_check(@PROJECT_NAME@_LIBRARY_DIR "${PACKAGE_PREFIX_DIR}/lib")

set(@PROJECT_NAME@_LIB gctl_graphic)
set(@PROJECT_NAME@_LIBRARY gctl_graphic)

set(@PROJECT_NAME@_GMT @GCTL_GRAPHIC_GMT@)
set(@PROJECT_NAME@_MATHGL @GCTL_GRAPHIC_MATHGL@)

message(STATUS "[GCTL_GRAPHIC] Use the GMT library: " @GCTL_GRAPHIC_GMT@)
message(STATUS "[GCTL_GRAPHIC] Use the mathGL library: " @GCTL_GRAPHIC_MATHGL@)

if(NOT GCTL_FOUND)
	find_package(GCTL REQUIRED)
	include_directories(${GCTL_INC_DIR})
endif()

if(@PROJECT_NAME@_GMT)
	if(NOT GMT_FOUND)
		find_package(GMT REQUIRED)
		include_directories(${GMT_INC_DIR})
	endif()
endif()

if(@PROJECT_NAME@_MATHGL)
	if(NOT MathGL2_FOUND)
		find_package(MathGL2 REQUIRED FLTK)
		include_directories(${MathGL2_INCLUDE_DIRS})
	endif()
endif()

# include target information
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")

check_required_components(@PROJECT_NAME@)