-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Linux support * EppoEditor and Engine building on linux * EppoTesting now also building * Update cmake * Add .csproj for linux build * Linux build support
- Loading branch information
Showing
27 changed files
with
615 additions
and
422 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
# IDE | ||
.idea | ||
.vs | ||
.vscode | ||
cmake-build-debug | ||
cmake-build-release | ||
build | ||
|
||
*.vcxproj* | ||
*.csproj* | ||
*.sln | ||
|
||
Makefile | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
cmake_minimum_required(VERSION 3.24) | ||
project(EppoEngine) | ||
|
||
if(WIN32) | ||
add_compile_definitions(EPPO_PLATFORM_WINDOWS VK_USE_PLATFORM_WIN32_KHR) | ||
elseif(UNIX) | ||
add_compile_definitions(EPPO_PLATFORM_LINUX) | ||
endif() | ||
|
||
if(CMAKE_BUILD_TYPE STREQUAL "Debug") | ||
add_compile_definitions(EPPO_DEBUG) | ||
else() | ||
add_compile_definitions(EPPO_RELEASE) | ||
endif() | ||
|
||
# Dependencies | ||
if(DEFINED ENV{VULKAN_SDK}) | ||
link_directories(AFTER $ENV{VULKAN_SDK}/lib) | ||
else() | ||
message(FATAL_ERROR "'VULKAN_SDK' not found in environment variables!") | ||
endif() | ||
|
||
set(CMAKE_LIBRARY_ARCHIVE_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | ||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | ||
|
||
add_subdirectory(EppoEngine/Vendor/bullet) | ||
add_subdirectory(EppoEngine/Vendor/glfw) | ||
add_subdirectory(EppoEngine/Vendor/imgui) | ||
add_subdirectory(EppoEngine/Vendor/yaml-cpp) | ||
add_subdirectory(EppoEngine/Vendor/googletest) | ||
|
||
add_subdirectory(EppoEngine) | ||
add_subdirectory(EppoEditor) | ||
add_subdirectory(EppoTesting) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
cmake_minimum_required(VERSION 3.24) | ||
|
||
project(EppoEditor VERSION 1.0 LANGUAGES CXX) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
# Sources | ||
file(GLOB_RECURSE SOURCES | ||
"Source/*.cpp" | ||
) | ||
|
||
# Includes | ||
set(INCLUDE_DIRS | ||
"Source" | ||
"Vendor/imgui" | ||
${CMAKE_SOURCE_DIR}/EppoEngine/Source | ||
) | ||
|
||
add_executable(${PROJECT_NAME} ${SOURCES}) | ||
|
||
target_compile_options(${PROJECT_NAME} PRIVATE ${mono_CFLAGS}) | ||
target_link_options(${PROJECT_NAME} PRIVATE ${mono_LDFLAGS}) | ||
target_include_directories(${PROJECT_NAME} PRIVATE ${INCLUDE_DIRS}) | ||
target_link_libraries(${PROJECT_NAME} PRIVATE | ||
EppoEng glfw imgui yaml-cpp | ||
${BULLET_COLLISION_LIBRARY} ${BULLET_DYNAMICS_LIBRARY} ${BULLET_MATH_LIBRARY} ${BULLET_SOFTBODY_LIBRARY} | ||
${mono_LIBRARIES} | ||
${Vulkan_LIBRARY} shaderc_combined spirv-cross-core spirv-cross-glsl | ||
) |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ namespace Eppo | |
{ | ||
struct PanelData | ||
{ | ||
Ref<Panel> Panel; | ||
Ref<Eppo::Panel> Panel; | ||
bool IsOpen = false; | ||
}; | ||
|
||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
cmake_minimum_required(VERSION 3.24) | ||
|
||
project(EppoEng VERSION 1.0 LANGUAGES CXX) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
# Sources | ||
file(GLOB_RECURSE SOURCES | ||
"Source/*.cpp" | ||
"Vendor/stb/stb_image.cpp" | ||
"Vendor/tinygltf/tinygltf.cpp" | ||
"Vendor/volk/volk.cpp" | ||
) | ||
|
||
foreach(item IN LISTS SOURCES) | ||
if(WIN32) | ||
if(item MATCHES "Source/Platform/Linux/.*\\.cpp$") | ||
list(REMOVE_ITEM SOURCES ${item}) | ||
endif() | ||
elseif(UNIX) | ||
if(item MATCHES "Source/Platform/Windows/.*\\.cpp$") | ||
list(REMOVE_ITEM SOURCES ${item}) | ||
endif() | ||
endif() | ||
endforeach() | ||
|
||
# Includes | ||
set(INCLUDE_DIRS | ||
"Source" | ||
"Vendor/bullet/include" | ||
"Vendor/bullet/include/bullet" | ||
"Vendor/entt/single_include" | ||
"Vendor/filewatch" | ||
"Vendor/glfw/include" | ||
"Vendor/glm" | ||
"Vendor/imgui" | ||
"Vendor/mono/include" | ||
"Vendor/spdlog/include" | ||
"Vendor/stb" | ||
"Vendor/tinygltf" | ||
"Vendor/tracy/public" | ||
"Vendor/vulkan-memory-allocator" | ||
"Vendor/volk" | ||
"Vendor/yaml-cpp/include" | ||
) | ||
|
||
# Externals | ||
include(FindPkgConfig) | ||
set(ENV{PKG_CONFIG_PATH} "/usr/local/bin/lib/pkgconfig") | ||
pkg_search_module(mono REQUIRED mono-2) | ||
find_package(Bullet REQUIRED) | ||
find_package(Vulkan REQUIRED) | ||
|
||
add_library(${PROJECT_NAME} STATIC ${SOURCES}) | ||
|
||
if(CMAKE_BUILD_TYPE STREQUAL "Debug") | ||
target_compile_definitions(${PROJECT_NAME} PRIVATE TRACY_ENABLE TRACY_ONLY_LOCALHOST) | ||
endif() | ||
|
||
target_compile_definitions(${PROJECT_NAME} PRIVATE VK_NO_PROTOTYPES) | ||
target_include_directories(${PROJECT_NAME} PUBLIC ${INCLUDE_DIRS} ${Vulkan_INCLUDE_DIRS} ${BULLET_INCLUDE_DIR}) | ||
target_precompile_headers(${PROJECT_NAME} PRIVATE Source/pch.h) |
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
Oops, something went wrong.