diff --git a/4dGraphics/GameCore.cpp b/4dGraphics/GameCore.cpp index b2938c7..74d188c 100644 --- a/4dGraphics/GameCore.cpp +++ b/4dGraphics/GameCore.cpp @@ -255,23 +255,23 @@ bool GameEngine::Start() glfwWindowHint( GLFW_CONTEXT_VERSION_MAJOR, 4 ); glfwWindowHint( GLFW_CONTEXT_VERSION_MINOR, 6 ); glfwWindowHint( GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE ); - //glfwWindowHint( GLFW_OPENGL_FORWARD_COMPAT, GLFW_TRUE ); + glfwWindowHint( GLFW_OPENGL_FORWARD_COMPAT, GLFW_TRUE ); const GLFWvidmode *mode = glfwGetVideoMode( glfwGetPrimaryMonitor() ); - glfwWindowHint( GLFW_REFRESH_RATE, mode->refreshRate ); + glfwWindowHint( GLFW_REFRESH_RATE, GLFW_DONT_CARE ); - glfwWindowHint( GLFW_RED_BITS, mode->redBits ); - glfwWindowHint( GLFW_GREEN_BITS, mode->greenBits ); - glfwWindowHint( GLFW_BLUE_BITS, mode->blueBits ); + glfwWindowHint( GLFW_RED_BITS, GLFW_DONT_CARE ); + glfwWindowHint( GLFW_GREEN_BITS, GLFW_DONT_CARE ); + glfwWindowHint( GLFW_BLUE_BITS, GLFW_DONT_CARE ); - glfwWindowHint( GLFW_ALPHA_BITS, 0 ); + glfwWindowHint( GLFW_ALPHA_BITS, GLFW_DONT_CARE ); - glfwWindowHint( GLFW_DEPTH_BITS, 0 ); - glfwWindowHint( GLFW_STENCIL_BITS, 0 ); + glfwWindowHint( GLFW_DEPTH_BITS, GLFW_DONT_CARE ); + glfwWindowHint( GLFW_STENCIL_BITS, GLFW_DONT_CARE ); - //glfwWindowHint( GLFW_SAMPLES, 4 ); - //glfwWindowHint( GLFW_SRGB_CAPABLE, GLFW_TRUE ); + glfwWindowHint( GLFW_SAMPLES, GLFW_DONT_CARE ); + glfwWindowHint( GLFW_SRGB_CAPABLE, GLFW_TRUE ); GLFWwindow *window = glfwCreateWindow( mode->width, mode->height, "GameEngine", NULL, NULL ); if( !window ) { TRACE( DebugLevel::FatalError, "Cannot create window\n" ); return false; } diff --git a/CMake/FixBundle.cmake.in b/CMake/FixBundle.cmake.in index 1ea4e8d..d12f558 100644 --- a/CMake/FixBundle.cmake.in +++ b/CMake/FixBundle.cmake.in @@ -16,11 +16,11 @@ set(dirs "@VCPKG_INSTALLED_DIR@/@VCPKG_TARGET_TRIPLET@/lib" "@VCPKG_INSTALLED_DIR@/@VCPKG_TARGET_TRIPLET@/debug/bin" "@VCPKG_INSTALLED_DIR@/@VCPKG_TARGET_TRIPLET@/debug/lib" - "@CMAKE_INSTALL_PREFIX@/bin/" - "@CMAKE_INSTALL_PREFIX@/lib/" + "@CMAKE_INSTALL_PREFIX@/bin" + "@CMAKE_INSTALL_PREFIX@/lib" ) -set(NewBundleDir "${CMAKE_INSTALL_PREFIX}/4dG.app/") +set(NewBundleDir "${CMAKE_INSTALL_PREFIX}/4dG.app/bin") execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory "${NewBundleDir}") set(NewBundlePath "${NewBundleDir}/4dGraphics@CMAKE_EXECUTABLE_SUFFIX@" ) execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${bundle}" "${NewBundlePath}") diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e4e716..6087ab0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,15 @@ -cmake_minimum_required (VERSION 3.21) +cmake_minimum_required (VERSION 3.21) set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake" CACHE STRING "Vcpkg toolchain file") set(CMAKE_CONFIGURATION_TYPES "Release;Debug;RelWithDebInfo;MinSizeRel" CACHE STRING "Configuration types for multi-configuration buildsystems") set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build configuration for single-configuration buildsystems") set(CMAKE_MACOSX_RPATH True) -list(APPEND CMAKE_INSTALL_RPATH - "$<$,$>>:$ORIGIN/>." ) + +if( APPLE ) + list(APPEND CMAKE_INSTALL_RPATH "@executable_path/../lib" ) +else() + list(APPEND CMAKE_INSTALL_RPATH "${ORIGIN}/../lib" ) +endif() project( 4DG )