From 21e1fe0c5a3a58a50ab88608b5e4719132bddaf0 Mon Sep 17 00:00:00 2001 From: perroboc <2722773+perroboc@users.noreply.github.com> Date: Tue, 3 Sep 2024 11:56:11 -0400 Subject: [PATCH 01/10] FIX: GCC14 compatible build --- CMakeLists.txt | 8 ++++---- .../flatbuffers/include/flatbuffers/stl_emulation.h | 2 +- .../GLSLGenerator/ShaderGenerator.cpp | 1 + .../Metal/EffekseerMaterialCompilerMetal.cpp | 1 + docs/Development/HowToBuild.md | 4 +++- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bbff29b4e5..9f2e88f7d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -351,11 +351,11 @@ if(BUILD_VIEWER OR BUILD_EXAMPLES OR BUILD_TEST) ) if(BUILD_WITH_POSTFIX) - set(GLFW3_LIB_DEBUG "glfw3d") - set(GLFW3_LIB_RELEASE "glfw3") + set(GLFW3_LIB_DEBUG "glfwd") + set(GLFW3_LIB_RELEASE "glfw") else() - set(GLFW3_LIB_DEBUG "glfw3") - set(GLFW3_LIB_RELEASE "glfw3") + set(GLFW3_LIB_DEBUG "glfw") + set(GLFW3_LIB_RELEASE "glfw") endif() list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glfw/include) diff --git a/Dev/Cpp/3rdParty/flatbuffers/include/flatbuffers/stl_emulation.h b/Dev/Cpp/3rdParty/flatbuffers/include/flatbuffers/stl_emulation.h index dc46456e4b..200d59ab07 100644 --- a/Dev/Cpp/3rdParty/flatbuffers/include/flatbuffers/stl_emulation.h +++ b/Dev/Cpp/3rdParty/flatbuffers/include/flatbuffers/stl_emulation.h @@ -627,7 +627,7 @@ class span FLATBUFFERS_FINAL_CLASS { private: // This is a naive implementation with 'count_' member even if (Extent != dynamic_extent). pointer const data_; - const size_type count_; + size_type count_; // https://github.com/google/flatbuffers/pull/7227 }; #if !defined(FLATBUFFERS_SPAN_MINIMAL) diff --git a/Dev/Cpp/EffekseerMaterialCompiler/GLSLGenerator/ShaderGenerator.cpp b/Dev/Cpp/EffekseerMaterialCompiler/GLSLGenerator/ShaderGenerator.cpp index 0b43e16909..c86867d2d9 100644 --- a/Dev/Cpp/EffekseerMaterialCompiler/GLSLGenerator/ShaderGenerator.cpp +++ b/Dev/Cpp/EffekseerMaterialCompiler/GLSLGenerator/ShaderGenerator.cpp @@ -3,6 +3,7 @@ #include "../Common/ShaderGeneratorCommon.h" #include +#include #undef min #undef max diff --git a/Dev/Cpp/EffekseerMaterialCompiler/Metal/EffekseerMaterialCompilerMetal.cpp b/Dev/Cpp/EffekseerMaterialCompiler/Metal/EffekseerMaterialCompilerMetal.cpp index 80dc7f6b0c..aca4def111 100644 --- a/Dev/Cpp/EffekseerMaterialCompiler/Metal/EffekseerMaterialCompilerMetal.cpp +++ b/Dev/Cpp/EffekseerMaterialCompiler/Metal/EffekseerMaterialCompilerMetal.cpp @@ -3,6 +3,7 @@ #include "../Common/ShaderGeneratorCommon.h" #include +#include namespace Effekseer { diff --git a/docs/Development/HowToBuild.md b/docs/Development/HowToBuild.md index e5fcb130e5..a5c9f776c1 100644 --- a/docs/Development/HowToBuild.md +++ b/docs/Development/HowToBuild.md @@ -31,7 +31,9 @@ Requirements - g++ - [.Net6.0 SDK](https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu) -- libx11-dev libgl1-mesa-dev libxrandr-dev libxi-dev x11proto-xf86vidmode-dev libx11-xcb-dev xorg-dev libglu1-mesa-dev libpulse-dev libgtk-3-dev libopenal-dev python3-distutils zenity +- Required packages: + - Ubuntu: `libx11-dev libgl1-mesa-dev libxrandr-dev libxi-dev x11proto-xf86vidmode-dev libx11-xcb-dev xorg-dev libglu1-mesa-dev libpulse-dev libgtk-3-dev libopenal-dev python3-distutils zenity` + - On Fedora 40: `gtk3-devel pulseaudio-libs-devel openal-soft-devel mesa-libGLU-devel libX11-devel libxcb-devel libXi-devel libXrandr-devel mesa-libGL-devel glfw-devel gd-devel python3 dotnet zenity` Get code and resources ---------- From aed4fdc8a11edd57114e77178ce3a2325efebfae Mon Sep 17 00:00:00 2001 From: perroboc <2722773+perroboc@users.noreply.github.com> Date: Tue, 3 Sep 2024 12:07:44 -0400 Subject: [PATCH 02/10] gitignore: added linux release files --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index f411418317..9390825b3f 100644 --- a/.gitignore +++ b/.gitignore @@ -48,6 +48,9 @@ Dev/release/runtimes/ Dev/release/resources/fonts/ Dev/release/resources/icons/ Dev/release/tools/ +Dev/release/ref/ +Dev/release/createdump +Dev/release/Effekseer* Dev/Cpp/include/ Dev/Cpp/lib/ From 3a8483fd2aa8a914411e3c6192ccfdbd8e2fb0a8 Mon Sep 17 00:00:00 2001 From: perroboc <2722773+perroboc@users.noreply.github.com> Date: Tue, 3 Sep 2024 12:41:04 -0400 Subject: [PATCH 03/10] CMAKE: find glfw3 library name --- CMakeLists.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f2e88f7d7..e7a2292a33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -350,12 +350,16 @@ if(BUILD_VIEWER OR BUILD_EXAMPLES OR BUILD_TEST) -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true ) + find_package(PkgConfig REQUIRED) + + # Check for glfw3 + pkg_check_modules(GLFW3 glfw3) + + set(GLFW3_LIB_DEBUG ${GLFW3_LIBRARIES}) + set(GLFW3_LIB_RELEASE ${GLFW3_LIBRARIES}) + if(BUILD_WITH_POSTFIX) - set(GLFW3_LIB_DEBUG "glfwd") - set(GLFW3_LIB_RELEASE "glfw") - else() - set(GLFW3_LIB_DEBUG "glfw") - set(GLFW3_LIB_RELEASE "glfw") + set(GLFW3_LIB_DEBUG "${GLFW3_LIB_DEBUG}d") endif() list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glfw/include) From 3acb521c714cee27a33a036a10380d257d773766 Mon Sep 17 00:00:00 2001 From: perroboc <2722773+perroboc@users.noreply.github.com> Date: Tue, 3 Sep 2024 12:47:31 -0400 Subject: [PATCH 04/10] CMAKE: fix win32 not using find_package --- CMakeLists.txt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e7a2292a33..8b76c6abba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -350,14 +350,20 @@ if(BUILD_VIEWER OR BUILD_EXAMPLES OR BUILD_TEST) -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true ) - find_package(PkgConfig REQUIRED) + # Check for glfw3 - pkg_check_modules(GLFW3 glfw3) + if(WIN32) + message(STATUS "Skipping pkg-config checks on Windows") + set(GLFW3_LIB_DEBUG "glfw3") + set(GLFW3_LIB_RELEASE "glfw3") + else() + find_package(PkgConfig REQUIRED) + pkg_check_modules(GLFW3 glfw3) + set(GLFW3_LIB_DEBUG ${GLFW3_LIBRARIES}) + set(GLFW3_LIB_RELEASE ${GLFW3_LIBRARIES}) + endif() - set(GLFW3_LIB_DEBUG ${GLFW3_LIBRARIES}) - set(GLFW3_LIB_RELEASE ${GLFW3_LIBRARIES}) - if(BUILD_WITH_POSTFIX) set(GLFW3_LIB_DEBUG "${GLFW3_LIB_DEBUG}d") endif() From eaa15add1b3392d6ba60521c9f2a0289857d774e Mon Sep 17 00:00:00 2001 From: perroboc <2722773+perroboc@users.noreply.github.com> Date: Tue, 3 Sep 2024 12:55:30 -0400 Subject: [PATCH 05/10] CMAKE: fix apple build --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b76c6abba..406b4aa349 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -353,7 +353,7 @@ if(BUILD_VIEWER OR BUILD_EXAMPLES OR BUILD_TEST) # Check for glfw3 - if(WIN32) + if(WIN32 OR APPLE) message(STATUS "Skipping pkg-config checks on Windows") set(GLFW3_LIB_DEBUG "glfw3") set(GLFW3_LIB_RELEASE "glfw3") From 96e39a73c2cf466ae457bedcfea7c1a5d9f03d33 Mon Sep 17 00:00:00 2001 From: perroboc <2722773+perroboc@users.noreply.github.com> Date: Tue, 3 Sep 2024 13:05:37 -0400 Subject: [PATCH 06/10] CMAKE: add libglfw3-dev to linux build --- .github/workflows/build.yml | 2 +- CMakeLists.txt | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ede807583e..081968a1fb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -134,7 +134,7 @@ jobs: wget -q https://packages.microsoft.com/config/ubuntu/18.04/prod.list sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list sudo apt-get update - sudo apt-get install -y libpulse-dev libglvnd-dev libx11-dev libopenal-dev libvulkan-dev \ + sudo apt-get install -y libglfw3-dev libpulse-dev libglvnd-dev libx11-dev libopenal-dev libvulkan-dev \ libgl1-mesa-dev libgles2-mesa-dev libglu1-mesa-dev libgtk-3-dev ninja-build dotnet-sdk-3.1 \ xcb libxcb-xkb-dev x11-xkb-utils libx11-xcb-dev libxkbcommon-x11-dev zenity diff --git a/CMakeLists.txt b/CMakeLists.txt index 406b4aa349..d511f86fa1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -354,9 +354,13 @@ if(BUILD_VIEWER OR BUILD_EXAMPLES OR BUILD_TEST) # Check for glfw3 if(WIN32 OR APPLE) - message(STATUS "Skipping pkg-config checks on Windows") - set(GLFW3_LIB_DEBUG "glfw3") - set(GLFW3_LIB_RELEASE "glfw3") + if(BUILD_WITH_POSTFIX) + set(GLFW3_LIB_DEBUG "glfw3d") + set(GLFW3_LIB_RELEASE "glfw3") + else() + set(GLFW3_LIB_DEBUG "glfw3") + set(GLFW3_LIB_RELEASE "glfw3") + endif() else() find_package(PkgConfig REQUIRED) pkg_check_modules(GLFW3 glfw3) From 373b262c7306436cea54ec7f151cd5a7ca9f0960 Mon Sep 17 00:00:00 2001 From: perroboc <2722773+perroboc@users.noreply.github.com> Date: Tue, 3 Sep 2024 17:39:31 -0400 Subject: [PATCH 07/10] FIX: enable HiDPI scaling on linux --- .gitignore | 2 ++ Dev/Cpp/EditorCommon/GUI/MainWindow.cpp | 6 ++++++ Dev/clean.sh | 2 ++ Tool/CMakeLists.txt | 2 +- docs/Development/HowToBuild.md | 2 +- release_tool.sh | 0 6 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 Dev/clean.sh mode change 100644 => 100755 release_tool.sh diff --git a/.gitignore b/.gitignore index 9390825b3f..6721e3cbde 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,5 @@ mono_crash.*.json mono_crash.*.blob Script/__pycache__/aceutils.cpython-37.pyc Tool/fbxsdk + +EffekseerTool/ \ No newline at end of file diff --git a/Dev/Cpp/EditorCommon/GUI/MainWindow.cpp b/Dev/Cpp/EditorCommon/GUI/MainWindow.cpp index 8f6ad009a5..13ea3e20b7 100644 --- a/Dev/Cpp/EditorCommon/GUI/MainWindow.cpp +++ b/Dev/Cpp/EditorCommon/GUI/MainWindow.cpp @@ -74,6 +74,12 @@ bool MainWindow::InitializeInternal(const char16_t* title, MainWindowState state float yscale = 1.0f; glfwGetMonitorContentScale(primary, &xscale, &yscale); dpiScale_ = xscale; +#elif defined(__linux__) + GLFWmonitor* primary = glfwGetPrimaryMonitor(); + float xscale = 1.0f; + float yscale = 1.0f; + glfwGetMonitorContentScale(primary, &xscale, &yscale); + dpiScale_ = xscale; #endif return true; diff --git a/Dev/clean.sh b/Dev/clean.sh new file mode 100644 index 0000000000..3db10b9a80 --- /dev/null +++ b/Dev/clean.sh @@ -0,0 +1,2 @@ +rm --force release/*.pdb +rm --force release/Effekseer diff --git a/Tool/CMakeLists.txt b/Tool/CMakeLists.txt index 6b4fca33fb..d4e1493907 100644 --- a/Tool/CMakeLists.txt +++ b/Tool/CMakeLists.txt @@ -8,7 +8,7 @@ endif() project(Tools) -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 14) if(MSVC) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") diff --git a/docs/Development/HowToBuild.md b/docs/Development/HowToBuild.md index a5c9f776c1..bef93903e9 100644 --- a/docs/Development/HowToBuild.md +++ b/docs/Development/HowToBuild.md @@ -32,7 +32,7 @@ Requirements - [.Net6.0 SDK](https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu) - Required packages: - - Ubuntu: `libx11-dev libgl1-mesa-dev libxrandr-dev libxi-dev x11proto-xf86vidmode-dev libx11-xcb-dev xorg-dev libglu1-mesa-dev libpulse-dev libgtk-3-dev libopenal-dev python3-distutils zenity` + - Ubuntu: `libglfw3-dev libx11-dev libgl1-mesa-dev libxrandr-dev libxi-dev x11proto-xf86vidmode-dev libx11-xcb-dev xorg-dev libglu1-mesa-dev libpulse-dev libgtk-3-dev libopenal-dev python3-distutils zenity` - On Fedora 40: `gtk3-devel pulseaudio-libs-devel openal-soft-devel mesa-libGLU-devel libX11-devel libxcb-devel libXi-devel libXrandr-devel mesa-libGL-devel glfw-devel gd-devel python3 dotnet zenity` Get code and resources diff --git a/release_tool.sh b/release_tool.sh old mode 100644 new mode 100755 From 68ca5b9df69c3968f8593cde60a6f59b68f39f55 Mon Sep 17 00:00:00 2001 From: perroboc <2722773+perroboc@users.noreply.github.com> Date: Wed, 4 Sep 2024 11:34:55 -0400 Subject: [PATCH 08/10] GCC14: Fix linux use of lib64 libraries --- .github/workflows/build.yml | 2 +- CMakeLists.txt | 83 ++++++++++++++++++---------------- docs/Development/HowToBuild.md | 4 +- 3 files changed, 48 insertions(+), 41 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 081968a1fb..5363d82bf6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -134,7 +134,7 @@ jobs: wget -q https://packages.microsoft.com/config/ubuntu/18.04/prod.list sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list sudo apt-get update - sudo apt-get install -y libglfw3-dev libpulse-dev libglvnd-dev libx11-dev libopenal-dev libvulkan-dev \ + sudo apt-get install -y libpulse-dev libglvnd-dev libx11-dev libopenal-dev libvulkan-dev \ libgl1-mesa-dev libgles2-mesa-dev libglu1-mesa-dev libgtk-3-dev ninja-build dotnet-sdk-3.1 \ xcb libxcb-xkb-dev x11-xkb-utils libx11-xcb-dev libxkbcommon-x11-dev zenity diff --git a/CMakeLists.txt b/CMakeLists.txt index d511f86fa1..1a18342d49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -238,9 +238,16 @@ if(BUILD_VIEWER) ) list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libpng/include) list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libpng/lib) + + if(WIN32 OR APPLE) + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libpng/lib) + else() + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libpng/lib64) + endif() if(MSVC) set(LIBPNG_LIB_DEBUG "libpng16_staticd") + set(LIBPNG_LIB_RELEASE "libpng16_static") elseif(BUILD_WITH_POSTFIX) set(LIBPNG_LIB_DEBUG "png16d") @@ -281,7 +288,12 @@ if(BUILD_VIEWER) endif() list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libgd/include) - list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libgd/lib) + if(WIN32 OR APPLE) + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libgd/lib) + else() + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libgd/lib64) + endif() + # OpenSoundMixer ExternalProject_Add( @@ -311,23 +323,28 @@ endif() if(BUILD_VIEWER OR BUILD_TEST) # glew if(NOT APPLE) - ExternalProject_Add( - ExternalProject_glew - SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Downloads/glew - PREFIX ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Build/glew - INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew - PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Dev/3rdPartyPatch/glew-CMakeLists.txt /CMakeLists.txt - CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew - -DCMAKE_USER_MAKE_RULES_OVERRIDE=${CMAKE_CURRENT_SOURCE_DIR}/Dev/CFlagOverrides.cmake - -DEFK_USE_MSVC_RUNTIME_LIBRARY_DLL=${USE_MSVC_RUNTIME_LIBRARY_DLL} - -DSANITIZE_ENABLED=${SANITIZE_ENABLED} - -DBUILD_SHARED_LIBS=OFF - -DGLEW_BUILD_INFO=OFF - -DBUILD_UTILS=OFF - -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true - ) - list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew/include) - list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew/lib) + ExternalProject_Add( + ExternalProject_glew + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Downloads/glew + PREFIX ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Build/glew + INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew + PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Dev/3rdPartyPatch/glew-CMakeLists.txt /CMakeLists.txt + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew + -DCMAKE_USER_MAKE_RULES_OVERRIDE=${CMAKE_CURRENT_SOURCE_DIR}/Dev/CFlagOverrides.cmake + -DEFK_USE_MSVC_RUNTIME_LIBRARY_DLL=${USE_MSVC_RUNTIME_LIBRARY_DLL} + -DSANITIZE_ENABLED=${SANITIZE_ENABLED} + -DBUILD_SHARED_LIBS=OFF + -DGLEW_BUILD_INFO=OFF + -DBUILD_UTILS=OFF + -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true + ) + list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew/include) + if(WIN32 OR APPLE) + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew/lib) + else() + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew/lib64) + endif() + endif() endif() @@ -350,30 +367,20 @@ if(BUILD_VIEWER OR BUILD_EXAMPLES OR BUILD_TEST) -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true ) - - - # Check for glfw3 - if(WIN32 OR APPLE) - if(BUILD_WITH_POSTFIX) - set(GLFW3_LIB_DEBUG "glfw3d") - set(GLFW3_LIB_RELEASE "glfw3") - else() - set(GLFW3_LIB_DEBUG "glfw3") - set(GLFW3_LIB_RELEASE "glfw3") - endif() - else() - find_package(PkgConfig REQUIRED) - pkg_check_modules(GLFW3 glfw3) - set(GLFW3_LIB_DEBUG ${GLFW3_LIBRARIES}) - set(GLFW3_LIB_RELEASE ${GLFW3_LIBRARIES}) - endif() - if(BUILD_WITH_POSTFIX) - set(GLFW3_LIB_DEBUG "${GLFW3_LIB_DEBUG}d") + set(GLFW3_LIB_DEBUG "glfw3d") + set(GLFW3_LIB_RELEASE "glfw3") + else() + set(GLFW3_LIB_DEBUG "glfw3") + set(GLFW3_LIB_RELEASE "glfw3") endif() list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glfw/include) - list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glfw/lib) + if(WIN32 OR APPLE) + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glfw/lib) + else() + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glfw/lib64) + endif() endif() list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/Dev/Cpp/3rdParty/flatbuffers/include) diff --git a/docs/Development/HowToBuild.md b/docs/Development/HowToBuild.md index bef93903e9..86194b74fe 100644 --- a/docs/Development/HowToBuild.md +++ b/docs/Development/HowToBuild.md @@ -32,8 +32,8 @@ Requirements - [.Net6.0 SDK](https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu) - Required packages: - - Ubuntu: `libglfw3-dev libx11-dev libgl1-mesa-dev libxrandr-dev libxi-dev x11proto-xf86vidmode-dev libx11-xcb-dev xorg-dev libglu1-mesa-dev libpulse-dev libgtk-3-dev libopenal-dev python3-distutils zenity` - - On Fedora 40: `gtk3-devel pulseaudio-libs-devel openal-soft-devel mesa-libGLU-devel libX11-devel libxcb-devel libXi-devel libXrandr-devel mesa-libGL-devel glfw-devel gd-devel python3 dotnet zenity` + - Ubuntu: `libx11-dev libgl1-mesa-dev libxrandr-dev libxi-dev x11proto-xf86vidmode-dev libx11-xcb-dev xorg-dev libglu1-mesa-dev libpulse-dev libgtk-3-dev libopenal-dev python3-distutils zenity` + - Fedora 40: `gtk3-devel pulseaudio-libs-devel openal-soft-devel mesa-libGLU-devel libX11-devel libxcb-devel libXi-devel libXrandr-devel mesa-libGL-devel python3 dotnet zenity` Get code and resources ---------- From 88279d12e070ef81b2b48a8822b7dd3640b6ec99 Mon Sep 17 00:00:00 2001 From: perroboc <2722773+perroboc@users.noreply.github.com> Date: Wed, 4 Sep 2024 11:52:03 -0400 Subject: [PATCH 09/10] GCC14: use lib64 folder if it exists --- CMakeLists.txt | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a18342d49..3a140279e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -237,12 +237,11 @@ if(BUILD_VIEWER) -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true ) list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libpng/include) - list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libpng/lib) - - if(WIN32 OR APPLE) - list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libpng/lib) - else() + + if(EXISTS "${ExternalProject_libpng_INSTALL_DIR}/lib64") list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libpng/lib64) + else() + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libpng/lib) endif() if(MSVC) @@ -288,10 +287,10 @@ if(BUILD_VIEWER) endif() list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libgd/include) - if(WIN32 OR APPLE) - list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libgd/lib) - else() + if(EXISTS "${ExternalProject_libgd_INSTALL_DIR}/lib64") list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libgd/lib64) + else() + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libgd/lib) endif() @@ -338,11 +337,12 @@ if(BUILD_VIEWER OR BUILD_TEST) -DBUILD_UTILS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true ) + list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew/include) - if(WIN32 OR APPLE) - list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew/lib) - else() + if(EXISTS "${ExternalProject_glew_INSTALL_DIR}/lib64") list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew/lib64) + else() + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew/lib) endif() endif() @@ -376,10 +376,10 @@ if(BUILD_VIEWER OR BUILD_EXAMPLES OR BUILD_TEST) endif() list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glfw/include) - if(WIN32 OR APPLE) - list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glfw/lib) - else() + if(EXISTS "${ExternalProject_glfw_INSTALL_DIR}/lib64") list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glfw/lib64) + else() + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glfw/lib) endif() endif() From 4c3ae3dc6af75d1f6140252564e2581094eb63d1 Mon Sep 17 00:00:00 2001 From: perroboc <2722773+perroboc@users.noreply.github.com> Date: Wed, 4 Sep 2024 12:10:57 -0400 Subject: [PATCH 10/10] github actions: Ubuntu lib/lib64 test --- CMakeLists.txt | 13 ++++--------- docs/Development/HowToBuild.md | 2 +- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a140279e2..aea6f04ddd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -237,11 +237,9 @@ if(BUILD_VIEWER) -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true ) list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libpng/include) - + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libpng/lib) if(EXISTS "${ExternalProject_libpng_INSTALL_DIR}/lib64") list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libpng/lib64) - else() - list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libpng/lib) endif() if(MSVC) @@ -287,10 +285,9 @@ if(BUILD_VIEWER) endif() list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libgd/include) + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libgd/lib) if(EXISTS "${ExternalProject_libgd_INSTALL_DIR}/lib64") list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libgd/lib64) - else() - list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libgd/lib) endif() @@ -339,10 +336,9 @@ if(BUILD_VIEWER OR BUILD_TEST) ) list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew/include) + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew/lib) if(EXISTS "${ExternalProject_glew_INSTALL_DIR}/lib64") list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew/lib64) - else() - list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew/lib) endif() endif() @@ -376,10 +372,9 @@ if(BUILD_VIEWER OR BUILD_EXAMPLES OR BUILD_TEST) endif() list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glfw/include) + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glfw/lib) if(EXISTS "${ExternalProject_glfw_INSTALL_DIR}/lib64") list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glfw/lib64) - else() - list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glfw/lib) endif() endif() diff --git a/docs/Development/HowToBuild.md b/docs/Development/HowToBuild.md index 86194b74fe..23da6be71d 100644 --- a/docs/Development/HowToBuild.md +++ b/docs/Development/HowToBuild.md @@ -33,7 +33,7 @@ Requirements - Required packages: - Ubuntu: `libx11-dev libgl1-mesa-dev libxrandr-dev libxi-dev x11proto-xf86vidmode-dev libx11-xcb-dev xorg-dev libglu1-mesa-dev libpulse-dev libgtk-3-dev libopenal-dev python3-distutils zenity` - - Fedora 40: `gtk3-devel pulseaudio-libs-devel openal-soft-devel mesa-libGLU-devel libX11-devel libxcb-devel libXi-devel libXrandr-devel mesa-libGL-devel python3 dotnet zenity` + - Fedora 40: `gtk3-devel pulseaudio-libs-devel openal-soft-devel mesa-libGLU-devel libX11-devel libxcb-devel libXi-devel libXrandr-devel mesa-libGL-devel python3 dotnet zenity ninja-build` Get code and resources ----------