wip
This commit is contained in:
parent
5e36709dc8
commit
5ce335bbb1
8 changed files with 66 additions and 121 deletions
|
@ -20,7 +20,7 @@ set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib )
|
|||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
add_subdirectory(core)
|
||||
add_subdirectory(client)
|
||||
add_subdirectory(editor)
|
||||
#add_subdirectory(client)
|
||||
#add_subdirectory(editor)
|
||||
|
||||
install(FILES $<TARGET_RUNTIME_DLLS:editor> TYPE BIN)
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"version": 2,
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "vcpkg",
|
||||
"generator": "Visual Studio 17 2022",
|
||||
"binaryDir": "${sourceDir}/build",
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-linux",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build",
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"version": 2,
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "default",
|
||||
"inherits": "vcpkg",
|
||||
"environment": {
|
||||
"VCPKG_ROOT": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\vcpkg\\vcpkg.exe"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
# Distributed under the OSI-approved BSD 3-Clause License.
|
||||
# Copyright Stefano Sinigardi
|
||||
|
||||
#.rst:
|
||||
# FindStb
|
||||
# ------------
|
||||
#
|
||||
# Find the Stb include headers.
|
||||
#
|
||||
# Result Variables
|
||||
# ^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# This module defines the following variables:
|
||||
#
|
||||
# ``Stb_FOUND``
|
||||
# True if Stb library found
|
||||
#
|
||||
# ``Stb_INCLUDE_DIR``
|
||||
# Location of Stb headers
|
||||
#
|
||||
|
||||
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
|
||||
include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake)
|
||||
|
||||
if(NOT Stb_INCLUDE_DIR)
|
||||
find_path(Stb_INCLUDE_DIR NAMES stb_image.h PATHS ${Stb_DIR} PATH_SUFFIXES include stb include/stb)
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(Stb DEFAULT_MSG Stb_INCLUDE_DIR)
|
||||
mark_as_advanced(Stb_INCLUDE_DIR)
|
|
@ -1,21 +1,4 @@
|
|||
find_package(OpenGL REQUIRED COMPONENTS OpenGL)
|
||||
|
||||
find_package(GLEW REQUIRED)
|
||||
include_directories(${GLEW_INCLUDE_DIRS})
|
||||
|
||||
find_package(OpenGL)
|
||||
find_package(glm CONFIG REQUIRED)
|
||||
find_package(ReactPhysics3D REQUIRED)
|
||||
find_package(pugixml 1.15 REQUIRED)
|
||||
find_package(Freetype)
|
||||
|
||||
find_package(Stb REQUIRED)
|
||||
include_directories(${Stb_INCLUDE_DIR})
|
||||
|
||||
# PkgConfig packages
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(LUAJIT REQUIRED luajit)
|
||||
link_directories(${LUAJIT_LIBRARY_DIRS})
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/deps.cmake)
|
||||
|
||||
### Autogen
|
||||
file(GLOB_RECURSE AUTOGEN_SOURCES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/src" "src/objects/*.h" "src/datatypes/*.h" "src/enum/*.h")
|
||||
|
|
63
core/deps.cmake
Normal file
63
core/deps.cmake
Normal file
|
@ -0,0 +1,63 @@
|
|||
# Declare/fetch packages
|
||||
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
glew
|
||||
GIT_REPOSITORY https://github.com/Perlmint/glew-cmake
|
||||
GIT_TAG glew-cmake-2.2.0
|
||||
)
|
||||
|
||||
FetchContent_Declare(
|
||||
glm
|
||||
GIT_REPOSITORY https://github.com/g-truc/glm
|
||||
GIT_TAG 1.0.1
|
||||
)
|
||||
|
||||
FetchContent_Declare(
|
||||
ReactPhysics3D
|
||||
GIT_REPOSITORY https://github.com/DanielChappuis/reactphysics3d
|
||||
GIT_TAG v0.10.2
|
||||
)
|
||||
|
||||
FetchContent_Declare(
|
||||
pugixml
|
||||
GIT_REPOSITORY https://github.com/zeux/pugixml
|
||||
GIT_TAG v1.15
|
||||
)
|
||||
|
||||
FetchContent_Declare(
|
||||
freetype
|
||||
GIT_REPOSITORY https://gitlab.freedesktop.org/freetype/freetype
|
||||
GIT_TAG VER-2-13-3
|
||||
)
|
||||
|
||||
FetchContent_Declare(
|
||||
stb
|
||||
GIT_REPOSITORY https://github.com/natanaeljr/stb-cmake-package
|
||||
GIT_TAG 1a4828e0cf649fb873c7b5f45b5d22d411a44ae4 # v0.9.0
|
||||
)
|
||||
|
||||
FetchContent_Declare(
|
||||
luajit
|
||||
GIT_REPOSITORY https://github.com/zhaozg/luajit-cmake
|
||||
GIT_TAG 300c0b3f472be2be158f5b2e6385579ba5c6c0f9
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(glew glm ReactPhysics3D pugixml freetype stb luajit)
|
||||
|
||||
# Find/include packages
|
||||
|
||||
find_package(OpenGL REQUIRED COMPONENTS OpenGL)
|
||||
# find_package(glew REQUIRED)
|
||||
include_directories(${GLEW_INCLUDE_DIRS})
|
||||
# find_package(glm CONFIG REQUIRED)
|
||||
# find_package(ReactPhysics3D REQUIRED)
|
||||
# find_package(pugixml 1.15 REQUIRED)
|
||||
# find_package(Freetype)
|
||||
# find_package(Stb REQUIRED)
|
||||
include_directories(${Stb_INCLUDE_DIR})
|
||||
|
||||
# PkgConfig packages
|
||||
# find_package(PkgConfig REQUIRED)
|
||||
# pkg_check_modules(LUAJIT REQUIRED luajit)
|
||||
link_directories(${LUAJIT_LIBRARY_DIRS})
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"default-registry": {
|
||||
"kind": "git",
|
||||
"baseline": "0c4cf19224a049cf82f4521e29e39f7bd680440c",
|
||||
"repository": "https://github.com/microsoft/vcpkg"
|
||||
},
|
||||
"registries": [
|
||||
{
|
||||
"kind": "artifact",
|
||||
"location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip",
|
||||
"name": "microsoft"
|
||||
}
|
||||
],
|
||||
"overlay-ports": [
|
||||
"./vcpkg-overlays"
|
||||
]
|
||||
}
|
20
vcpkg.json
20
vcpkg.json
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"dependencies": [
|
||||
"glew",
|
||||
"glfw3",
|
||||
"glm",
|
||||
{ "name": "pugixml", "version>=": "1.15" },
|
||||
"sdl2",
|
||||
"stb",
|
||||
"reactphysics3d",
|
||||
"pkgconf",
|
||||
"luajit",
|
||||
"freetype"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"name": "sdl2",
|
||||
"version": "2.32.4"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Add table
Reference in a new issue