imgui

FORK: Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
git clone https://git.neptards.moe/neptards/imgui.git
Log | Files | Refs

CMakeLists.txt (1556B)


      1 # Example usage:
      2 #  mkdir build
      3 #  cd build
      4 #  cmake -g "Visual Studio 14 2015" ..
      5 
      6 cmake_minimum_required(VERSION 2.8)
      7 project(imgui_example_glfw_vulkan C CXX)
      8 
      9 if(NOT CMAKE_BUILD_TYPE)
     10   set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE)
     11 endif()
     12 
     13 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DVK_PROTOTYPES")
     14 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_PROTOTYPES")
     15 
     16 # GLFW
     17 set(GLFW_DIR ../../../glfw) # Set this to point to an up-to-date GLFW repo
     18 option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF)
     19 option(GLFW_BUILD_TESTS "Build the GLFW test programs" OFF)
     20 option(GLFW_BUILD_DOCS "Build the GLFW documentation" OFF)
     21 option(GLFW_INSTALL "Generate installation target" OFF)
     22 option(GLFW_DOCUMENT_INTERNALS "Include internals in documentation" OFF)
     23 add_subdirectory(${GLFW_DIR} binary_dir EXCLUDE_FROM_ALL)
     24 include_directories(${GLFW_DIR}/include)
     25 
     26 # Dear ImGui
     27 set(IMGUI_DIR ../../)
     28 include_directories(${IMGUI_DIR} ${IMGUI_DIR}/backends ..)
     29 
     30 # Libraries
     31 find_package(Vulkan REQUIRED)
     32 #find_library(VULKAN_LIBRARY
     33   #NAMES vulkan vulkan-1)
     34 #set(LIBRARIES "glfw;${VULKAN_LIBRARY}")
     35 set(LIBRARIES "glfw;Vulkan::Vulkan")
     36 
     37 # Use vulkan headers from glfw:
     38 include_directories(${GLFW_DIR}/deps)
     39 
     40 file(GLOB sources *.cpp)
     41 
     42 add_executable(example_glfw_vulkan ${sources} ${IMGUI_DIR}/backends/imgui_impl_glfw.cpp ${IMGUI_DIR}/backends/imgui_impl_vulkan.cpp ${IMGUI_DIR}/imgui.cpp ${IMGUI_DIR}/imgui_draw.cpp ${IMGUI_DIR}/imgui_demo.cpp ${IMGUI_DIR}/imgui_tables.cpp ${IMGUI_DIR}/imgui_widgets.cpp)
     43 target_link_libraries(example_glfw_vulkan ${LIBRARIES})