Skip to content

Commit

Permalink
cmake support
Browse files Browse the repository at this point in the history
  • Loading branch information
IngInx747 committed Jan 3, 2021
1 parent 5f0b594 commit 4ae0593
Show file tree
Hide file tree
Showing 558 changed files with 446 additions and 553,353 deletions.
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,14 @@
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain

###############################################################################
# linguist overrides
#
# Use the linguist-vendored attribute to vendor or un-vendor paths.
# Use the linguist-documentation attribute to mark or unmark paths as documentation.
# Use the linguist-generated attribute to mark or unmark paths as generated.
# Use the linguist-detectable attribute to mark or unmark paths as detectable.
###############################################################################
3dparty/* linguist-vendored
meshes/* linguist-vendored
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Bb]uild/

# Visual Studio 2015 cache/options directory
.vs/

# Visual Studio Code local config directory
.vscode/

# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

Expand Down
22 changes: 22 additions & 0 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# CMakeLists of libraries to build as static libs.
# The libs are used by multiple executables and other libs.

# glad
find_package(glad REQUIRED HINTS "${CMAKE_SOURCE_DIR}/3rdparty/glad")
add_library(glad STATIC ${GLAD_SOURCES} ${GLAD_HEADERS})
include_directories(${GLAD_INCLUDE_DIRS})

# imgui (requires: glad, glfw)
find_package(imgui REQUIRED HINTS "${CMAKE_SOURCE_DIR}/3rdparty/imgui")
find_package(glfw REQUIRED HINTS "${CMAKE_SOURCE_DIR}/3rdparty/glfw")
add_library(imgui STATIC ${IMGUI_SOURCES} ${IMGUI_HEADERS})
add_dependencies(imgui glad)
include_directories("${IMGUI_INCLUDE_DIRS}")
include_directories("${GLAD_INCLUDE_DIRS}")
include_directories("${GLFW_INCLUDE_DIRS}")
target_link_libraries(imgui "${GLFW_LIBS}")

# preprocessing
if (WIN32)
add_definitions()
endif ()
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.
23 changes: 23 additions & 0 deletions 3rdparty/assimp/assimpConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Locate root dir
SET(ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}")

# Locate libraries dir
IF (CMAKE_CL_64)
SET(LIBS "${ROOT_DIR}/lib/assimp-vc140-mt.lib")
ELSE (CMAKE_CL_64)
SET(LIBS "${ROOT_DIR}/lib/assimp-vc140-mt.lib")
ENDIF (CMAKE_CL_64)

# Handle the QUIETLY and REQUIRED arguments and set XXX_FOUND to TRUE if all listed variables are TRUE.
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
assimp DEFAULT_MSG
ROOT_DIR
LIBS)

SET(ASSIMP_LIBS ${LIBS})
SET(ASSIMP_INCLUDE_DIRS ${ROOT_DIR})

MARK_AS_ADVANCED(
ASSIMP_LIBS
ASSIMP_INCLUDE_DIRS)
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.
26 changes: 26 additions & 0 deletions 3rdparty/glad/gladConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Locate root dir
SET(ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}")

FILE(GLOB SOURCES
"${ROOT_DIR}/glad.c")

FILE(GLOB HEADERS
"${ROOT_DIR}/glad.h"
"${ROOT_DIR}/khrplatform.h")

# Handle the QUIETLY and REQUIRED arguments and set XXX_FOUND to TRUE if all listed variables are TRUE.
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
glad DEFAULT_MSG
ROOT_DIR
SOURCES
HEADERS)

SET(GLAD_SOURCES ${SOURCES})
SET(GLAD_HEADERS ${HEADERS})
SET(GLAD_INCLUDE_DIRS ${ROOT_DIR})

MARK_AS_ADVANCED(
GLAD_SOURCES
GLAD_HEADERS
GLAD_INCLUDE_DIRS)
File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions 3rdparty/glfw/glfwConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Locate root dir
SET(ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}")

# Locate libraries dir
IF (CMAKE_CL_64)
SET(LIBS "${ROOT_DIR}/lib/glfw3.lib")
ELSE (CMAKE_CL_64)
SET(LIBS "${ROOT_DIR}/lib/glfw3.lib")
ENDIF (CMAKE_CL_64)

# Handle the QUIETLY and REQUIRED arguments and set XXX_FOUND to TRUE if all listed variables are TRUE.
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
glfw DEFAULT_MSG
ROOT_DIR
LIBS)

SET(GLFW_LIBS ${LIBS})
SET(GLFW_INCLUDE_DIRS ${ROOT_DIR})

MARK_AS_ADVANCED(
GLFW_LIBS
GLFW_INCLUDE_DIRS)
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.
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.
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.
12 changes: 12 additions & 0 deletions 3rdparty/glm/glmConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Locate root dir
SET(ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}")

# Handle the QUIETLY and REQUIRED arguments and set XXX_FOUND to TRUE if all listed variables are TRUE.
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
glm DEFAULT_MSG
ROOT_DIR)

SET(GLM_INCLUDE_DIRS ${ROOT_DIR})

MARK_AS_ADVANCED(GLM_INCLUDE_DIRS)
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.
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.
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.
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 4ae0593

Please sign in to comment.