Skip to content

Commit

Permalink
[#26]: Unify directories names for dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobDomagala committed Aug 1, 2021
1 parent 1cdc703 commit e24a336
Show file tree
Hide file tree
Showing 58 changed files with 42 additions and 43 deletions.
14 changes: 7 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,11 @@ paket-files/
# Project specific folders
build
.vscode
dependencies/Freetype/Freetype*
dependencies/GLM/glm*
dependencies/STB_IMAGE/STB_IMAGE*
dependencies/JSON/JSON*
dependencies/FMT/FMT*
dependencies/Imgui/IMGUI*
dependencies/glfw/GLFW*
dependencies/freetype/freetype*
dependencies/glm/glm*
dependencies/stb_image/stb_image*
dependencies/json/json*
dependencies/fmt/fmt*
dependencies/imgui/imgui*
dependencies/glfw/glfw*
*imgui.ini
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions dependencies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ function(FIND_AND_DOWNLOAD_ZIP_RESOURCE ResourceURL ResourceName Version)
endif()
endfunction()

add_subdirectory(Glad)
add_subdirectory(glad)
add_subdirectory(glfw)
add_subdirectory(Imgui)
add_subdirectory(Freetype)
add_subdirectory(STB_IMAGE)
add_subdirectory(GLM)
add_subdirectory(JSON)
add_subdirectory(FMT)
add_subdirectory(imgui)
add_subdirectory(freetype)
add_subdirectory(stb_image)
add_subdirectory(glm)
add_subdirectory(json)
add_subdirectory(fmt)

2 changes: 0 additions & 2 deletions dependencies/FMT/CMakeLists.txt

This file was deleted.

15 changes: 0 additions & 15 deletions dependencies/Imgui/CMakeLists.txt

This file was deleted.

6 changes: 0 additions & 6 deletions dependencies/JSON/CMakeLists.txt

This file was deleted.

3 changes: 0 additions & 3 deletions dependencies/STB_IMAGE/CMakeLists.txt

This file was deleted.

2 changes: 2 additions & 0 deletions dependencies/fmt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FIND_AND_DOWNLOAD_GIT_RESOURCE(fmt https://github.com/fmtlib/fmt.git)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/fmt)
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
file(GLOB HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/include/glad/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/include/KHR/*.h")
file(GLOB SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.c")

add_library(GLAD STATIC ${HEADERS} ${SOURCES} )
add_library(glad STATIC ${HEADERS} ${SOURCES} )
#target_sources(GLAD PUBLIC )
target_include_directories(GLAD SYSTEM PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include/")
target_include_directories(glad SYSTEM PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include/")
# For linux we may need to add -ldl
#target_link_libraries (GLAD INTERFACE opengl32)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions dependencies/imgui/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FIND_AND_DOWNLOAD_GIT_RESOURCE(imgui https://github.com/ocornut/imgui.git)

set(HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/imgui/imconfig.h" "${CMAKE_CURRENT_SOURCE_DIR}/imgui/imgui.h" "${CMAKE_CURRENT_SOURCE_DIR}/imgui/imgui_internal.h"
"${CMAKE_CURRENT_SOURCE_DIR}/imgui/imstb_rectpack.h" "${CMAKE_CURRENT_SOURCE_DIR}/imgui/imstb_textedit.h" "${CMAKE_CURRENT_SOURCE_DIR}/imgui/imstb_truetype.h"
"${CMAKE_CURRENT_SOURCE_DIR}/imgui/backends/imgui_impl_glfw.h" "${CMAKE_CURRENT_SOURCE_DIR}/imgui/backends/imgui_impl_opengl3.h")

set(SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/imgui/imgui.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/imgui/imgui_demo.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/imgui/imgui_draw.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/imgui/imgui_tables.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/imgui/backends/imgui_impl_opengl3.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/imgui/backends/imgui_impl_glfw.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/imgui/imgui_widgets.cpp")

add_library(imgui STATIC ${HEADERS} ${SOURCES})
target_include_directories(imgui SYSTEM PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/imgui/" "${CMAKE_CURRENT_SOURCE_DIR}/imgui/backends")

# Needed for backend code
target_link_libraries(imgui PRIVATE glfw glad)
5 changes: 5 additions & 0 deletions dependencies/json/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FIND_AND_DOWNLOAD_GIT_RESOURCE(json https://github.com/nlohmann/json.git)

set(JSON_BuildTests OFF CACHE INTERNAL "")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/json)

3 changes: 3 additions & 0 deletions dependencies/stb_image/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FIND_AND_DOWNLOAD_GIT_RESOURCE(stb_image https://github.com/nothings/stb.git)
add_library(stb_image INTERFACE IMPORTED GLOBAL)
target_include_directories(stb_image INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/stb_image")
2 changes: 1 addition & 1 deletion engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ target_include_directories(${MODULE_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}" "
"${CMAKE_CURRENT_SOURCE_DIR}/Logger" "${CMAKE_CURRENT_SOURCE_DIR}/Render"
"${CMAKE_CURRENT_SOURCE_DIR}/Time" "${CMAKE_CURRENT_SOURCE_DIR}/Window")

target_link_libraries_system (${MODULE_NAME} PUBLIC glm glfw GLAD STB_IMAGE freetype nlohmann_json::nlohmann_json fmt IMGUI)
target_link_libraries_system (${MODULE_NAME} PUBLIC glm glfw glad stb_image freetype nlohmann_json::nlohmann_json fmt imgui)
target_link_libraries(${MODULE_NAME} PUBLIC project_warnings project_options)
target_compile_features(${MODULE_NAME} PRIVATE cxx_std_20)

Expand Down

0 comments on commit e24a336

Please sign in to comment.