Created
July 26, 2016 22:40
-
-
Save nebgnahz/b10dc964b7541f125696a2ea79350333 to your computer and use it in GitHub Desktop.
Simple CMakeLists of using IMGUI on Mac OS (with GLFW)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.0.0) | |
set(PROJECT project-name) | |
project(${PROJECT}) | |
set(SOURCES | |
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp | |
${CMAKE_CURRENT_SOURCE_DIR}/imgui.cpp | |
${CMAKE_CURRENT_SOURCE_DIR}/imgui_demo.cpp | |
${CMAKE_CURRENT_SOURCE_DIR}/imgui_draw.cpp | |
${CMAKE_CURRENT_SOURCE_DIR}/imgui_impl_glfw.cpp | |
) | |
if(APPLE) | |
find_library(COCOA_LIBRARY Cocoa) | |
find_library(OPENGL_LIBRARY OpenGL) | |
find_library(IOKIT_LIBRARY IOKit) | |
find_library(COREVIDEO_LIBRARY CoreVideo) | |
set(EXTRA_LIBS | |
${COCOA_LIBRARY} | |
${OPENGL_LIBRARY} | |
${IOKIT_LIBRARY} | |
${COREVIDEO_LIBRARY} | |
-lglfw3 | |
gif | |
) | |
endif(APPLE) | |
include_directories(${CMAKE_CURRENT_SOURCE_DIR}) | |
add_executable(${PROJECT} ${SOURCES}) | |
target_link_libraries(${PROJECT} ${EXTRA_LIBS}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment