Skip to content

Commit

Permalink
Build : Upgrade the build/install process
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomrno committed Apr 28, 2024
1 parent e30546c commit 57283a9
Show file tree
Hide file tree
Showing 16 changed files with 289 additions and 312 deletions.
32 changes: 28 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

cmake_minimum_required(VERSION 3.16)
project(vortex)

Expand All @@ -25,12 +24,9 @@ target_include_directories(vortex_shared PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/tools/editor
)

# Ajouter d'autres dépendances ou configurations pour la bibliothèque partagée

# Liste des fichiers sources pour l'exécutable principal
file(GLOB_RECURSE VORTEX_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main/src/*.cpp")


# Add editor
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tools/editor editor_build)
target_link_libraries(vortex_shared PUBLIC editor)
Expand All @@ -50,3 +46,31 @@ install(TARGETS vortex DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/build/bin)

# Installation de la bibliothèque partagée dans /lib
install(TARGETS vortex_shared LIBRARY DESTINATION /lib)

# Définir le répertoire d'installation pour les fichiers d'en-tête
set(INSTALL_INCLUDE_DIR /usr/include/Vortex)

# Installation des fichiers d'en-tête de /main/include
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/main/include/
DESTINATION ${INSTALL_INCLUDE_DIR}/main/include/
PATTERN "*.h"
PATTERN "*.hpp"
PATTERN "*.inl"
)

# Installation des fichiers d'en-tête de /tools/editor/app/include
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tools/editor/app/
DESTINATION ${INSTALL_INCLUDE_DIR}/tools/editor/app/
PATTERN "*.h"
PATTERN "*.hpp"
PATTERN "*.inl"
)

# Installation des fichiers d'en-tête de /lib
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib/
DESTINATION ${INSTALL_INCLUDE_DIR}/lib
FILES_MATCHING
PATTERN "*.h"
PATTERN "*.hpp"
PATTERN "*.inl"
)
Binary file modified build/bin/vortex
Binary file not shown.
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <thread>
#include <fstream>

#include "./tools/editor/app/src/editor.h"
#include "./tools/editor/app/include/editor.h"
#include "./main/include/vortex.h"
#include "./lib/uikit/src/EntryPoint.h"

Expand Down
20 changes: 11 additions & 9 deletions main/include/vortex.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,27 @@
#include <dirent.h>
#include <deque>


namespace fs = std::filesystem;

#ifndef VORTEX_API
#define VORTEX_API
#endif
#ifndef VORTEX_EXT_API
#define VORTEX_EXT_API VORTEX_API
#endif


#include "../../lib/uikit/lib/imgui/imgui.h"
#include "../../lib/uikit/lib/imgui/imgui_internal.h"
#include "../../lib/uikit/lib/imgui/backends/imgui_impl_vulkan.h"
#include "../../lib/uikit/lib/imgui/backends/imgui_impl_glfw.h"
#include "../../lib/uikit/lib/stb-image/stb_image.h"
// #include "../../lib/glm/glm/glm.hpp"
#include "../../lib/uikit/lib/glfw/include/GLFW/glfw3.h"
#include "../../lib/spdlog/include/spdlog/spdlog.h"

#include "../../lib/json/single_include/nlohmann/json.hpp"

namespace fs = std::filesystem;

#ifndef VORTEX_API
#define VORTEX_API
#endif
#ifndef VORTEX_EXT_API
#define VORTEX_EXT_API VORTEX_API
#endif

// Helper Macros
#ifndef VX_ASSERT
Expand Down
12 changes: 0 additions & 12 deletions main/include/vortex_internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,6 @@ extern VORTEX_API VxContext *CVortexMaker; // Current implicit context pointer
#define Vx_BASE64ENCODE(_toencodebuffer) base64_encode(_toencodebuffer);
#define Vx_BASE64DECODE(_todecodebuffer) base64_decode(_todecodebuffer);

//-----------------------------------------------------------------------------
// (Base structure) VortexMakerMatrix
//-----------------------------------------------------------------------------
// A matrix is a point of matrix can interact with each others
//-----------------------------------------------------------------------------

struct hRandom {
static hString GenerateUUIDv4();
static hString Generate6CharID();
};
//-----------------------------------------------------------------------------

//_____________________________________________________________________________

struct VortexMakerDebugAllocInfo {
Expand Down
2 changes: 2 additions & 0 deletions main/src/vortex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ void VortexMaker::DebugAllocHook(VortexMakerDebugAllocInfo *info, void *ptr,
}*/
}



//-----------------------------------------------------------------------------
// [SECTION] ImGuiTextBuffer, ImGuiTextIndex
//-----------------------------------------------------------------------------
Expand Down
43 changes: 2 additions & 41 deletions tools/editor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,55 +26,15 @@ add_library(editor
${CMAKE_CURRENT_SOURCE_DIR}/app/core/ProjectViewer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/app/core/ModuleManager.cpp

#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Host/wins/UI_ContentWindow.cpp
#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Host/wins/UI_MainSettings.cpp
#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Host/wins/UI_ParameterWindow.cpp
#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Host/wins/UI_FullBuild.cpp
# ${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Host/wins/UI_AssetsViewer.cpp
# ${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Host/wins/UI_SnapshotUtility.cpp
# ${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Host/wins/UI_CurrentHostPreview.cpp
# ${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Host/wins/UI_TasksEditor.cpp
# ${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Host/wins/UI_VolatileTasks.cpp
# ${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Host/HostInstance.cpp

# ${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/GPOS/GPOSInstance.cpp
# ${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/GPOS/wins/UI_MainSettings.cpp

# ${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Assets/Script/wins/UI_MainSettings.cpp
# ${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Assets/Script/wins/UI_FileBrowser.cpp
# ${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Assets/Script/ScriptInstance.cpp

#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Assets/Package/PackageInstance.cpp
#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Assets/Package/wins/UI_MainSettings.cpp
#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Assets/Package/wins/UI_ActionsEditor.cpp
#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Assets/Package/wins/UI_CompilationArguments.cpp

# ${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Assets/Tasklist/wins/UI_MainSettings.cpp
# ${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Assets/Tasklist/TasklistInstance.cpp

#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Toolchain/ToolchainInstance.cpp
#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Toolchain/wins/UI_ContentWindow.cpp
#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Toolchain/wins/UI_AssetsViewer.cpp
#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Toolchain/wins/UI_MainSettings.cpp
#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Toolchain/wins/UI_FullBuild.cpp
#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Toolchain/wins/UI_TasksEditor.cpp
#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Toolchain/wins/UI_ManualBuild.cpp
#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Toolchain/wins/UI_VolatileTasks.cpp
#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Toolchain/wins/UI_SnapshotUtility.cpp
#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Toolchain/wins/UI_CurrentToolchainPreview.cpp
#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Components/Toolchain/wins/UI_ParameterWindow.cpp

#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Utils/Report/ReportInstance.cpp
${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Utils/ModuleDetails/ModuleDetails.cpp
#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Utils/TextEditor/TextEditor.cpp
#${CMAKE_CURRENT_SOURCE_DIR}/app/instances/Utils/TextEditor/TextEditorInstance.cpp
)


target_include_directories(editor PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../)

# editor requirements
find_package(Vulkan REQUIRED)
option(SPDLOG_INSTALL "Enable installation of spdlog" ON)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../lib/spdlog spdlog_build)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../lib/uikit/lib/glfw glfw_build)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../lib/uikit/lib/glm glm_build)
Expand All @@ -87,4 +47,5 @@ target_link_libraries(editor PUBLIC glm)
target_link_libraries(editor PUBLIC stbimage)
target_link_libraries(editor PUBLIC spdlog)


install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../lib/uikit/platform/GUI/editor/icon.png DESTINATION /usr/include/vortex)
2 changes: 1 addition & 1 deletion tools/editor/app/core/ContentBrowser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#ifndef CONTENTBROWSER_H
#define CONTENTBROWSER_H

#include "../src/instanceFactory.h"
#include "../include/instanceFactory.h"

class ContentBrowserPanel
{
Expand Down
Loading

0 comments on commit 57283a9

Please sign in to comment.