1set(IGRAPH_VERSION "@PACKAGE_VERSION_BASE@")
2@PACKAGE_INIT@
3
4include("${CMAKE_CURRENT_LIST_DIR}/igraph-targets.cmake")
5
6# Check whether C++ support is enabled; this is needed to ensure that programs
7# that are dependent on igraph will get linked with the C++ linker and not the
8# "plain" C linker
9get_property(LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
10if("CXX" IN_LIST LANGUAGES)
11  # This is okay
12else()
13  message(FATAL_ERROR "Please enable C++ support in your project if you are linking to igraph.")
14endif()
15
16# Turn on CMP0012 because the following if() conditionals will use "ON" and
17# "OFF" verbatim and they must be evaluated as booleans
18cmake_policy(PUSH)
19cmake_policy(SET CMP0012 NEW)
20if(@IGRAPH_OPENMP_SUPPORT@)
21  find_package(OpenMP)
22endif()
23cmake_policy(POP)
24
25check_required_components(igraph)
26