Findimgui.cmake 884 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#-----------------------------------------------------------------------------
# Find path
#-----------------------------------------------------------------------------
find_path(imgui_INCLUDE_DIR
  NAMES
    imgui.h
    )
mark_as_advanced(imgui_INCLUDE_DIR)
message(STATUS "imgui_INCLUDE_DIR : ${imgui_INCLUDE_DIR}")

#-----------------------------------------------------------------------------
# Find package
#-----------------------------------------------------------------------------
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(imgui
  REQUIRED_VARS
    imgui_INCLUDE_DIR)

#-----------------------------------------------------------------------------
# If missing target, create it
#-----------------------------------------------------------------------------
if(GLM_FOUND AND NOT TARGET imgui)
  add_library(imgui INTERFACE IMPORTED)
endif()