- Katılım
- 11 May 2023
- Konular
- 237
- Mesajlar
- 1,033
- Online süresi
- 1ay 23g
- Reaksiyon Skoru
- 678
- Altın Konu
- 1
- Başarım Puanı
- 176
- TM Yaşı
- 2 Yıl 11 Ay 15 Gün
- MmoLira
- 510
- DevLira
- 315
Metin2 EP, Valorant VP dahil tüm oyun ürünlerini en uygun fiyatlarla bulabilir, Item ve Karakterlerinizi hızlıca satabilirsiniz. HEMEN TIKLA!
Kod:
cmake_minimum_required(VERSION 3.15.0 FATAL_ERROR)
# CMP0091 politikasını NEW yapalım (deprecation warning'den kurtulmak için)
cmake_policy(SET CMP0091 NEW)
cmake_policy(SET CMP0144 NEW) # Boost_ROOT için yeni policy
set(CRASHPAD_BUILD_TESTS ON)
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
"${CMAKE_CURRENT_SOURCE_DIR}/buildtool/cmake"
)
set(METIN2_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
if(WIN32 AND NOT ANDROID)
set(HUNTER_CONFIGURATION_TYPES "Release;Debug" CACHE STRING "Hunter dependency build variants" FORCE)
else()
set(HUNTER_CONFIGURATION_TYPES "Release" CACHE STRING "Hunter dependency build variants" FORCE)
endif()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "Setting build type to Debug as none was specified.")
set(CMAKE_BUILD_TYPE Debug
CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel tsan asan lsan msan ubsan"
FORCE)
else()
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}
CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel tsan asan lsan msan ubsan"
FORCE)
endif()
# ⭐ LOKAL BOOST KULLANIMI - GÜNCELLENMİŞ ⭐
option(USE_LOCAL_BOOST "Use local Boost installation at C:/local/boost_1_85_0" ON)
# Boost yollarını belirle (1.85.0 versiyonuna göre güncellendi)
set(Boost_ROOT "C:/local/boost_1_85_0") # ⭐ DEĞİŞTİ: BOOST_ROOT yerine Boost_ROOT ⭐
set(BOOST_ROOT "C:/local/boost_1_85_0")
set(BOOST_LIBRARYDIR "${BOOST_ROOT}/lib64-msvc-14.2")
set(BOOST_INCLUDEDIR "${BOOST_ROOT}")
message(STATUS "Boost root: ${Boost_ROOT}")
message(STATUS "Boost library dir: ${BOOST_LIBRARYDIR}")
message(STATUS "Boost include dir: ${BOOST_INCLUDEDIR}")
# Kütüphane isim pattern'ini kontrol et
file(GLOB BOOST_LIBS "${BOOST_LIBRARYDIR}/*.lib")
list(LENGTH BOOST_LIBS NUM_BOOST_LIBS)
message(STATUS "Found ${NUM_BOOST_LIBS} Boost libraries in ${BOOST_LIBRARYDIR}")
# ⭐ HUNTER'ı HER DURUMDA YÜKLE (ama Boost'u hariç tut) ⭐
# Hunter ayarları
set(HUNTER_CACHE_SERVERS "https://github.com/cpp-pm/hunter-cache")
set(HUNTER_USE_CACHE_SERVERS YES)
set(HUNTER_CACHE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/.hunter_cache" CACHE PATH "Hunter cache directory" FORCE)
set(HUNTER_ENABLED ON)
# HunterGate'i proje öncesinde çağır
include(HunterGate)
HunterGate(
URL "https://github.com/cpp-pm/hunter/archive/v0.26.1.tar.gz"
SHA1 "e41ac7a18c49b35ebac99ff2b5244317b2638a65"
LOCAL
)
# ⭐ PROJECT ÇAĞRISI HUNTERGATE'TEN SONRA OLMALI ⭐
project(Diamas_Project LANGUAGES CXX C)
include(GNUInstallDirs)
# ... önceki kodlar ...
## BOOST KONFİGÜRASYONU - 1.85.0 için güncellendi
if(USE_LOCAL_BOOST AND WIN32)
message(STATUS "Configuring local Boost from: ${BOOST_LIBRARYDIR}")
# Boost'u bulmayı dene (yeni policy ile)
find_package(Boost 1.85.0 QUIET
COMPONENTS chrono context locale coroutine filesystem regex system thread program_options
PATHS ${Boost_ROOT}
PATH_SUFFIXES "lib64-msvc-14.2"
NO_DEFAULT_PATH
)
if(Boost_FOUND)
message(STATUS "Boost found via find_package")
message(STATUS "Boost version: ${Boost_VERSION}")
message(STATUS "Boost libraries: ${Boost_LIBRARIES}")
message(STATUS "Boost include dirs: ${Boost_INCLUDE_DIRS}")
else()
message(STATUS "Boost not found via find_package, using manual configuration")
# Manuel konfigürasyon
set(Boost_VERSION 1.85.0)
set(Boost_INCLUDE_DIRS "${BOOST_INCLUDEDIR}")
set(Boost_FOUND TRUE)
# Include dizinini kontrol et
if(EXISTS "${BOOST_INCLUDEDIR}/boost/version.hpp")
message(STATUS "Boost headers verified at ${BOOST_INCLUDEDIR}")
else()
message(FATAL_ERROR "Boost headers not found at ${BOOST_INCLUDEDIR}")
endif()
endif()
# ⭐⭐ ÖNEMLİ: Boost::boost target'ını oluştur ⭐⭐
if(NOT TARGET Boost::boost)
add_library(Boost::boost INTERFACE IMPORTED)
set_target_properties(Boost::boost PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_NO_LIB"
)
message(STATUS "Created Boost::boost target")
endif()
# Boost::headers target'ını da oluştur (bazen bu da kullanılıyor)
if(NOT TARGET Boost::headers)
add_library(Boost::headers INTERFACE IMPORTED)
set_target_properties(Boost::headers PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
)
endif()
# Her bir component için target oluştur (1.85.0 için)
set(BOOST_COMPONENTS chrono context locale coroutine filesystem regex system thread program_options)
set(BOOST_LIBRARIES_LIST "")
foreach(component ${BOOST_COMPONENTS})
# Farklı library isim pattern'lerini dene (1.85.0 için)
set(LIB_NAMES
"libboost_${component}-vc142-mt-x64-1_85"
"boost_${component}-vc142-mt-x64-1_85"
"libboost_${component}-vc142-mt-gd-x64-1_85" # Debug
"boost_${component}-vc142-mt-gd-x64-1_85" # Debug
"libboost_${component}"
"boost_${component}"
)
find_library(BOOST_${component}_LIB
NAMES ${LIB_NAMES}
PATHS ${BOOST_LIBRARYDIR}
NO_DEFAULT_PATH
NO_CMAKE_FIND_ROOT_PATH
)
if(BOOST_${component}_LIB)
message(STATUS "Found Boost::${component} at ${BOOST_${component}_LIB}")
if(NOT TARGET Boost::${component})
add_library(Boost::${component} UNKNOWN IMPORTED)
set_target_properties(Boost::${component} PROPERTIES
IMPORTED_LOCATION "${BOOST_${component}_LIB}"
INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_NO_LIB"
)
# Boost::boost'a bağımlılık ekle
set_target_properties(Boost::${component} PROPERTIES
INTERFACE_LINK_LIBRARIES "Boost::boost"
)
# Debug/Release ayırımı
if(BOOST_${component}_LIB MATCHES ".*-gd-.*")
set_target_properties(Boost::${component} PROPERTIES
IMPORTED_LOCATION_DEBUG "${BOOST_${component}_LIB}"
IMPORTED_LOCATION_RELEASE "${BOOST_LIBRARYDIR}/libboost_${component}-vc142-mt-x64-1_85.lib"
)
else()
set_target_properties(Boost::${component} PROPERTIES
IMPORTED_LOCATION_RELEASE "${BOOST_${component}_LIB}"
IMPORTED_LOCATION_DEBUG "${BOOST_LIBRARYDIR}/libboost_${component}-vc142-mt-gd-x64-1_85.lib"
)
endif()
list(APPEND BOOST_LIBRARIES_LIST Boost::${component})
endif()
else()
# Library bulunamadı, header-only olabilir mi kontrol et
set(HEADER_ONLY_COMPONENTS date_time)
if(NOT component IN_LIST HEADER_ONLY_COMPONENTS)
message(WARNING "Boost component ${component} not found in ${BOOST_LIBRARYDIR}")
# Header-only component için interface library oluştur
add_library(Boost::${component} INTERFACE IMPORTED)
set_target_properties(Boost::${component} PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "Boost::boost"
)
list(APPEND BOOST_LIBRARIES_LIST Boost::${component})
endif()
endif()
endforeach()
# Final değişkenleri
set(Boost_LIBRARIES ${BOOST_LIBRARIES_LIST})
set(BOOST_LIBRARIES ${BOOST_LIBRARIES_LIST})
message(STATUS "Configured Boost with ${Boost_LIBRARIES} libraries")
else()
# Hunter'dan Boost kullan (alternatif)
message(STATUS "Using Boost from Hunter")
hunter_add_package(Boost COMPONENTS chrono context locale coroutine filesystem regex system thread program_options)
find_package(Boost CONFIG REQUIRED chrono context locale coroutine filesystem regex system thread program_options)
endif()
# ... sonraki kodlar ...
## ⭐ DİĞER PAKETLER İÇİN HUNTER - Boost hariç ⭐
# Boost zaten hallettik, diğerleri için Hunter'ı kullan
message(STATUS "Adding other packages via Hunter...")
hunter_add_package(Microsoft.GSL)
hunter_add_package(Eigen)
hunter_add_package(CreateLaunchers)
if(WIN32)
hunter_add_package(freetype)
hunter_add_package(harfbuzz)
endif()
hunter_add_package(Catch)
hunter_add_package(fmt)
hunter_add_package(spdlog)
hunter_add_package(pegtl)
hunter_add_package(utf8)
hunter_add_package(xxhash)
hunter_add_package(cpp_redis)
hunter_add_package(flatbuffers)
hunter_add_package(MySQL-client)
# Paketleri bul
find_package(MySQL-client REQUIRED)
find_package(Flatbuffers CONFIG REQUIRED)
find_package(cpp_redis CONFIG REQUIRED)
find_package(xxhash CONFIG REQUIRED)
find_package(spdlog CONFIG REQUIRED)
find_package(pegtl CONFIG REQUIRED)
find_package(utf8cpp CONFIG REQUIRED)
find_package(Microsoft.GSL CONFIG REQUIRED)
find_package(Catch2 CONFIG REQUIRED)
find_package(CreateLaunchers CONFIG REQUIRED)
find_package(Eigen3 CONFIG REQUIRED)
if(WIN32)
find_package(freetype CONFIG REQUIRED)
find_package(harfbuzz CONFIG REQUIRED)
endif()
find_package(Threads REQUIRED)
find_package(fmt REQUIRED)
include(CreateLaunchers)
SET(CMAKE_COLOR_MAKEFILE ON)
SET(CMAKE_BUILD_RPATH_USE_ORIGIN ON)
set(METIN2_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
set(METIN2_PGO ${CMAKE_CURRENT_SOURCE_DIR}/data/pgo)
set(METIN2_BIN_ROOT ${CMAKE_CURRENT_BINARY_DIR})
set(METIN2_SHARE ${METIN2_ROOT}/src/share)
set(METIN2_3RDPARTY ${METIN2_ROOT}/thirdparty CACHE STRING "Metin2 3rd party path")
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
option(METIN2_USE_PREFIX_HEADERS "Enable the use of precompiled headers" ON)
option(METIN2_USE_ASAN "Pass -fsanitize=address during Clang builds" OFF)
option(METIN2_USE_CYTHON "Build the client with cython" ON)
option(METIN2_BUILD_DOC "Build documentation" OFF)
option(METIN2_BUILD_NATIVE "Build with -march=native" OFF)
include(Compiler)
include(Config)
include(CommonTargets)
include(PythonTargets)
if(METIN2_IS_WIN)
include(cef_cmake)
endif()
include(${METIN2_3RDPARTY}/Config.cmake)
if(METIN2_BUILD_NATIVE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
endif()
if (NOT WIN32)
find_package(Backtrace REQUIRED)
endif()
if (METIN2_IS_WIN)
find_package(DirectX9 REQUIRED)
else ()
find_package(Backtrace REQUIRED)
endif()
if(METIN2_BUILD_DOC)
add_subdirectory(doc)
endif()
if(METIN2_USE_CYTHON)
add_compile_definitions(ENABLE_CYTHON)
endif()
add_subdirectory(src)
if (METIN2_IS_WIN)
add_custom_target(
metin2 DEPENDS
metin2client_run
metin2server_db
metin2server_game
metin2server_auth
metin2server_master
metin2tool_qc
metin2tool_makemotionproto
metin2tool_dumpproto
)
else ()
add_custom_target(
metin2 DEPENDS
metin2server_db
metin2server_game
metin2server_auth
metin2server_master
metin2tool_qc
)
endif ()
# Boost bilgilerini göster
message(STATUS "========================================")
message(STATUS "Boost Configuration Summary:")
message(STATUS " Root: ${Boost_ROOT}")
message(STATUS " Library Dir: ${BOOST_LIBRARYDIR}")
message(STATUS " Include Dir: ${BOOST_INCLUDEDIR}")
message(STATUS " Found: ${Boost_FOUND}")
message(STATUS " Version: ${Boost_VERSION}")
if(DEFINED Boost_LIBRARIES)
message(STATUS " Libraries: ${Boost_LIBRARIES}")
endif()
message(STATUS "========================================")
boost tekrardan build edilmesin diye sabite alındı build edilmiş yeri kullanıyor
- Katılım
- 11 May 2023
- Konular
- 237
- Mesajlar
- 1,033
- Online süresi
- 1ay 23g
- Reaksiyon Skoru
- 678
- Altın Konu
- 1
- Başarım Puanı
- 176
- TM Yaşı
- 2 Yıl 11 Ay 15 Gün
- MmoLira
- 510
- DevLira
- 315
boost 1.86
ve tüm kütüphaneler güncellendi
bgfxde güncellendi 2023
gpu %30 %20 den
%10 a düştü
ve tüm kütüphaneler güncellendi
bgfxde güncellendi 2023
gpu %30 %20 den
%10 a düştü
- Katılım
- 11 May 2023
- Konular
- 237
- Mesajlar
- 1,033
- Online süresi
- 1ay 23g
- Reaksiyon Skoru
- 678
- Altın Konu
- 1
- Başarım Puanı
- 176
- TM Yaşı
- 2 Yıl 11 Ay 15 Gün
- MmoLira
- 510
- DevLira
- 315
gpu %30 lara çıkıyordu.
dxvk ile .dll değiştirlerek
gpu 0 a indi
ram 500 den 850 yükseldi
cpu aynı
gtx 1060 6 gb olmasına rağmen %30 gpu aşırı yüksek metin2 gibi bir oyuna göre
dxvk ile .dll değiştirlerek
gpu 0 a indi
ram 500 den 850 yükseldi
cpu aynı
gtx 1060 6 gb olmasına rağmen %30 gpu aşırı yüksek metin2 gibi bir oyuna göre
Şu an konuyu görüntüleyenler (Toplam : 1, Üye: 0, Misafir: 1)
Benzer konular
- Cevaplar
- 3
- Görüntüleme
- 342
- Çözüldü
Cevaplanmadı
Files Exe Log Hatası Lütfen Yardım Dostlar
- Cevaplar
- 6
- Görüntüleme
- 866
- Cevaplar
- 1
- Görüntüleme
- 1K


