Skip to content

Commit

Permalink
Added glfw and imgui submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
erincatto committed Jan 11, 2019
1 parent b1b3f30 commit 9b79c86
Show file tree
Hide file tree
Showing 9 changed files with 108 additions and 784 deletions.
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[submodule "extern/imgui"]
path = extern/imgui
url = [email protected]:ocornut/imgui.git
shallow = true
[submodule "extern/glfw"]
path = extern/glfw
url = [email protected]:glfw/glfw.git
shallow = true
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ set(HEADER_FILES
include/box2d-lite/MathUtils.h
include/box2d-lite/World.h)

find_package(OpenGL REQUIRED)

add_library(box2d-lite STATIC ${SOURCE_FILES} ${INCLUDE_FILES})
target_include_directories(box2d-lite PUBLIC include/box2d-lite ext/glut ${OPENGL_INCLUDE_DIR})
target_include_directories(box2d-lite PUBLIC external/glfw/include include/box2d-lite ${OPENGL_INCLUDE_DIR})

find_package(OpenGL REQUIRED)
add_subdirectory(external/glfw)
add_executable(samples samples/main.cpp)
target_link_libraries(samples PUBLIC box2d-lite ${CMAKE_CURRENT_SOURCE_DIR}/ext/glut/glut32.lib ${OPENGL_LIBRARIES})
target_include_directories(samples PUBLIC ext/glut ${OPENGL_INCLUDE_DIR})
# target_include_directories(samples PUBLIC external/glfw/include ${OPENGL_INCLUDE_DIR})
target_link_libraries(samples PUBLIC box2d-lite glfw ${GLFW_LIBRARIES} ${OPENGL_LIBRARIES} ${OPENGL_glu_LIBRARY})
Loading

0 comments on commit 9b79c86

Please sign in to comment.