Findimgui.cmake 1.13 KB
Newer Older
Aaron Bray's avatar
Aaron Bray committed
1
include(imstkFind)
2
#-----------------------------------------------------------------------------
Aaron Bray's avatar
Aaron Bray committed
3
# Find All Headers for imgui
4
#-----------------------------------------------------------------------------
Aaron Bray's avatar
Aaron Bray committed
5 6 7 8
imstk_find_header(imgui imgui.h imgui)
imstk_find_header_package(imgui)
#message(STATUS "imgui includes : ${IMGUI_INCLUDE_DIRS}")

9 10 11 12 13 14 15 16 17 18 19 20 21 22
if(FIND_IMGUI_SOURCE)
  #-----------------------------------------------------------------------------
  # Find Source
  # Since imgui has no CMake, code is pulled into an iMSTK component directly
  #-----------------------------------------------------------------------------
  find_path(IMGUI_SOURCE_DIR
    NAMES
      imgui.cpp
    PATHS
      ${CMAKE_BINARY_DIR}/../External/imgui/src
    NO_DEFAULT_PATH
    )
  mark_as_advanced(IMGUI_SOURCE_DIR)
  #message(STATUS "imgui source : ${IMGUI_SOURCE_DIR}")
23

24 25 26 27 28 29 30 31
  #-----------------------------------------------------------------------------
  # Find package
  #-----------------------------------------------------------------------------
  include(FindPackageHandleStandardArgs)
  find_package_handle_standard_args(imgui
    REQUIRED_VARS
      IMGUI_SOURCE_DIR)
endif()