4 # Finds the GLU library
6 # This will define the following target:
8 # ${APP_NAME_LC}::GLU - The GLU library
10 if(NOT TARGET ${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME})
12 find_package(PkgConfig)
15 pkg_check_modules(PC_GLU glu QUIET)
18 find_path(GLU_INCLUDE_DIR NAMES GL/glu.h
19 HINTS ${PC_GLU_INCLUDEDIR})
20 find_library(GLU_LIBRARY NAMES GLU
21 HINTS ${PC_GLU_LIBDIR})
23 include(FindPackageHandleStandardArgs)
24 find_package_handle_standard_args(GLU
25 REQUIRED_VARS GLU_LIBRARY GLU_INCLUDE_DIR)
28 add_library(${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} UNKNOWN IMPORTED)
29 set_target_properties(${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} PROPERTIES
30 IMPORTED_LOCATION "${GLU_LIBRARY}"
31 INTERFACE_INCLUDE_DIRECTORIES "${GLU_INCLUDE_DIR}")