mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-28 13:27:15 +00:00
CMake cleanup (#5082)
This commit is contained in:
@@ -39,7 +39,7 @@ jobs:
|
|||||||
- name: Configure
|
- name: Configure
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B build -G Ninja \
|
cmake -S . -B build -G Ninja \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||||
-DEQEMU_BUILD_TESTS=ON \
|
-DEQEMU_BUILD_TESTS=ON \
|
||||||
@@ -89,7 +89,7 @@ jobs:
|
|||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 `
|
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 `
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
|
-DCMAKE_BUILD_TYPE=Release `
|
||||||
-DEQEMU_BUILD_TESTS=ON `
|
-DEQEMU_BUILD_TESTS=ON `
|
||||||
-DEQEMU_BUILD_LOGIN=ON `
|
-DEQEMU_BUILD_LOGIN=ON `
|
||||||
-DEQEMU_BUILD_LUA=ON `
|
-DEQEMU_BUILD_LUA=ON `
|
||||||
@@ -98,8 +98,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: cmake --build build --config RelWithDebInfo --target ALL_BUILD -- /m
|
run: cmake --build build --config Release --target ALL_BUILD -- /m
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
working-directory: build
|
working-directory: build
|
||||||
run: ./bin/RelWithDebInfo/tests.exe
|
run: ./bin/Release/tests.exe
|
||||||
|
|||||||
+20
-15
@@ -18,6 +18,17 @@ if(NOT CMAKE_TOOLCHAIN_FILE)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Uncomment to generate just the standard Debug and Release configurations
|
||||||
|
#set(CMAKE_BUILD_TYPE "Debug")
|
||||||
|
#set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
|
||||||
|
|
||||||
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
|
|
||||||
|
set(dummy "${CMAKE_C_COMPILER}")
|
||||||
|
|
||||||
project(EQEmu
|
project(EQEmu
|
||||||
VERSION 24.10.3
|
VERSION 24.10.3
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
@@ -30,31 +41,25 @@ if(POLICY CMP0167)
|
|||||||
cmake_policy(SET CMP0167 NEW)
|
cmake_policy(SET CMP0167 NEW)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
|
option(EQEMU_BUILD_PCH "Build with precompiled headers" ON)
|
||||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Build type")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
||||||
|
|
||||||
option(EQEMU_BUILD_PCH "Build with precompiled headers (Windows)" ON)
|
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
add_compile_options(/bigobj)
|
# Always build with debug symbols
|
||||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS NOMINMAX WIN32_LEAN_AND_MEAN CRASH_LOGGING)
|
add_compile_options("$<$<CONFIG:RELEASE>:/Zi>")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
add_link_options("$<$<CONFIG:RELEASE>:/DEBUG /OPT:REF /OPT:ICF>")
|
||||||
|
|
||||||
option(EQEMU_DISABLE_MSVC_WARNINGS "Disable MSVC compile warnings." OFF)
|
add_compile_options(/bigobj /MP)
|
||||||
if(EQEMU_DISABLE_MSVC_WARNINGS)
|
add_compile_definitions(_CRT_SECURE_NO_WARNINGS NOMINMAX WIN32_LEAN_AND_MEAN CRASH_LOGGING)
|
||||||
add_compile_options(/W0 /wd4005 /wd4996 /nologo /Os)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
option(EQEMU_MSVC_DEBUG_CRT "Use the debug CRT on MSVC debug builds" OFF)
|
option(EQEMU_MSVC_DEBUG_CRT "Use the debug CRT on MSVC debug builds" OFF)
|
||||||
if(EQEMU_MSVC_DEBUG_CRT)
|
if(EQEMU_MSVC_DEBUG_CRT)
|
||||||
add_compile_definitions(_CRT_DBG_MAP_ALLOC)
|
add_compile_definitions(_CRT_DBG_MAP_ALLOC)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
add_compile_options("$<$<CONFIG:RELEASE>:-g>")
|
||||||
|
|
||||||
add_compile_definitions(HAS_UNION_SEMUN)
|
add_compile_definitions(HAS_UNION_SEMUN)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
+46
-21
@@ -2,46 +2,71 @@
|
|||||||
"version": 3,
|
"version": 3,
|
||||||
"cmakeMinimumRequired": {
|
"cmakeMinimumRequired": {
|
||||||
"major": 3,
|
"major": 3,
|
||||||
"minor": 19,
|
"minor": 20,
|
||||||
"patch": 0
|
"patch": 0
|
||||||
},
|
},
|
||||||
"configurePresets": [
|
"configurePresets": [
|
||||||
{
|
{
|
||||||
"name": "linux-debug",
|
"name": "linux",
|
||||||
"displayName": "Linux Debug",
|
"displayName": "Linux-Ninja",
|
||||||
"generator": "Ninja",
|
"generator": "Ninja",
|
||||||
"binaryDir": "${sourceDir}/build",
|
"binaryDir": "${sourceDir}/build",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Debug",
|
"EQEMU_BUILD_TESTS": "ON"
|
||||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
|
||||||
"CMAKE_C_COMPILER_LAUNCHER": "ccache",
|
|
||||||
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
|
|
||||||
"EQEMU_BUILD_LOGIN": "ON",
|
|
||||||
"EQEMU_BUILD_TESTS": "ON",
|
|
||||||
"EQEMU_ADD_PROFILER": "ON"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "linux-release",
|
"name": "linux-clang",
|
||||||
"displayName": "Linux Release",
|
"displayName": "Linux-Ninja (Clang)",
|
||||||
"generator": "Ninja",
|
"generator": "Ninja",
|
||||||
"binaryDir": "${sourceDir}/build/release",
|
"binaryDir": "${sourceDir}/build",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Release",
|
"EQEMU_BUILD_TESTS": "ON",
|
||||||
"CMAKE_C_COMPILER_LAUNCHER": "ccache",
|
"CMAKE_C_COMPILER": "clang",
|
||||||
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
|
"CMAKE_CXX_COMPILER": "clang++"
|
||||||
"EQEMU_BUILD_LOGIN": "ON"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "win-msvc",
|
"name": "linux-ccache",
|
||||||
|
"displayName": "Linux-Ninja (Ccache)",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_C_COMPILER_LAUNCHER": "ccache",
|
||||||
|
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
|
||||||
|
"EQEMU_BUILD_TESTS": "ON"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-clang-ccache",
|
||||||
|
"displayName": "Linux-Ninja (Clang, Ccache)",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_C_COMPILER_LAUNCHER": "ccache",
|
||||||
|
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
|
||||||
|
"EQEMU_BUILD_TESTS": "ON",
|
||||||
|
"CMAKE_C_COMPILER": "clang",
|
||||||
|
"CMAKE_CXX_COMPILER": "clang++"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "win-msvc-2022",
|
||||||
"displayName": "Windows MSVC (VS 2022)",
|
"displayName": "Windows MSVC (VS 2022)",
|
||||||
"generator": "Visual Studio 17 2022",
|
"generator": "Visual Studio 17 2022",
|
||||||
"binaryDir": "${sourceDir}/build/${presetName}",
|
"binaryDir": "${sourceDir}/build",
|
||||||
|
"architecture": { "value": "x64" },
|
||||||
|
"cacheVariables": {
|
||||||
|
"EQEMU_BUILD_TESTS": "ON"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "win-msvc-2026",
|
||||||
|
"displayName": "Windows MSVC (VS 2026)",
|
||||||
|
"generator": "Visual Studio 18 2026",
|
||||||
|
"binaryDir": "${sourceDir}/build",
|
||||||
"architecture": { "value": "x64" },
|
"architecture": { "value": "x64" },
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_CONFIGURATION_TYPES": "Debug;Release",
|
|
||||||
"EQEMU_BUILD_LOGIN": "ON",
|
|
||||||
"EQEMU_BUILD_TESTS": "ON"
|
"EQEMU_BUILD_TESTS": "ON"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,2 @@
|
|||||||
cmake_minimum_required(VERSION 3.20)
|
|
||||||
|
|
||||||
add_subdirectory(import)
|
add_subdirectory(import)
|
||||||
add_subdirectory(export)
|
add_subdirectory(export)
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
cmake_minimum_required(VERSION 3.20.0)
|
|
||||||
|
|
||||||
set(export_sources
|
set(export_sources
|
||||||
main.cpp
|
main.cpp
|
||||||
)
|
)
|
||||||
@@ -12,7 +10,6 @@ add_executable(export_client_files ${export_sources} ${export_headers})
|
|||||||
install(TARGETS export_client_files RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
install(TARGETS export_client_files RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
|
|
||||||
target_link_libraries(export_client_files common)
|
target_link_libraries(export_client_files common)
|
||||||
target_include_directories(export_client_files PRIVATE ../..)
|
|
||||||
|
|
||||||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||||
set_property(TARGET export_client_files PROPERTY FOLDER executables/tools)
|
set_property(TARGET export_client_files PROPERTY FOLDER executables/tools)
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
cmake_minimum_required(VERSION 3.20.0)
|
|
||||||
|
|
||||||
set(import_sources
|
set(import_sources
|
||||||
main.cpp
|
main.cpp
|
||||||
)
|
)
|
||||||
@@ -12,7 +10,6 @@ add_executable(import_client_files ${import_sources} ${import_headers})
|
|||||||
install(TARGETS import_client_files RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
install(TARGETS import_client_files RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
|
|
||||||
target_link_libraries(import_client_files common)
|
target_link_libraries(import_client_files common)
|
||||||
target_include_directories(import_client_files PRIVATE ../..)
|
|
||||||
|
|
||||||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||||
set_property(TARGET import_client_files PROPERTY FOLDER executables/tools)
|
set_property(TARGET import_client_files PROPERTY FOLDER executables/tools)
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
cmake_minimum_required(VERSION 3.20.0)
|
|
||||||
|
|
||||||
set(common_sources
|
set(common_sources
|
||||||
base_packet.cpp
|
base_packet.cpp
|
||||||
bazaar.cpp
|
bazaar.cpp
|
||||||
@@ -767,7 +765,6 @@ add_library(common ${common_sources} ${common_headers} ${repositories})
|
|||||||
|
|
||||||
target_compile_definitions(common PUBLIC BOOST_BIND_GLOBAL_PLACEHOLDERS GLM_FORCE_RADIANS GLM_FORCE_CTOR_INIT GLM_ENABLE_EXPERIMENTAL ENABLE_SECURITY)
|
target_compile_definitions(common PUBLIC BOOST_BIND_GLOBAL_PLACEHOLDERS GLM_FORCE_RADIANS GLM_FORCE_CTOR_INIT GLM_ENABLE_EXPERIMENTAL ENABLE_SECURITY)
|
||||||
target_include_directories(common PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../submodules/websocketpp")
|
target_include_directories(common PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../submodules/websocketpp")
|
||||||
target_include_directories(common PRIVATE ..)
|
|
||||||
target_link_libraries(common PUBLIC cereal::cereal fmt::fmt unofficial::libmariadb $<IF:$<TARGET_EXISTS:libuv::uv_a>,libuv::uv_a,libuv::uv> OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB unofficial-sodium::sodium)
|
target_link_libraries(common PUBLIC cereal::cereal fmt::fmt unofficial::libmariadb $<IF:$<TARGET_EXISTS:libuv::uv_a>,libuv::uv_a,libuv::uv> OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB unofficial-sodium::sodium)
|
||||||
|
|
||||||
# Requires libgoogle-perftools-dev google-perftools packages for linux (debian)
|
# Requires libgoogle-perftools-dev google-perftools packages for linux (debian)
|
||||||
@@ -809,16 +806,10 @@ endif()
|
|||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
target_link_libraries(common PUBLIC uuid)
|
target_link_libraries(common PUBLIC uuid)
|
||||||
set_source_files_properties("patches/sod.cpp" "patches/sof.cpp" "patches/rof.cpp" "patches/rof2.cpp" "patches/uf.cpp" PROPERTIES COMPILE_FLAGS -O0)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EQEMU_BUILD_PCH)
|
if(EQEMU_BUILD_PCH)
|
||||||
TARGET_PRECOMPILE_HEADERS(common PRIVATE pch/std-pch.h)
|
TARGET_PRECOMPILE_HEADERS(common PRIVATE pch/std-pch.h)
|
||||||
# Avoid PCH/__OPTIMIZE__ mismatch when compiling certain patch sources with -O0
|
|
||||||
# These files are compiled with -O0 on UNIX (see COMPILE_FLAGS above), which
|
|
||||||
# disables the __OPTIMIZE__ predefined macro. Disabling PCH for them prevents
|
|
||||||
# Clang from erroring due to macro state differences between the PCH and TU.
|
|
||||||
set_source_files_properties("patches/sod.cpp" "patches/sof.cpp" "patches/rof.cpp" "patches/rof2.cpp" "patches/uf.cpp" PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
cmake_minimum_required(VERSION 3.20)
|
|
||||||
|
|
||||||
set(eqlaunch_sources
|
set(eqlaunch_sources
|
||||||
eqlaunch.cpp
|
eqlaunch.cpp
|
||||||
worldserver.cpp
|
worldserver.cpp
|
||||||
@@ -16,7 +14,6 @@ add_executable(eqlaunch ${eqlaunch_sources} ${eqlaunch_headers})
|
|||||||
install(TARGETS eqlaunch RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
install(TARGETS eqlaunch RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
|
|
||||||
target_link_libraries(eqlaunch common)
|
target_link_libraries(eqlaunch common)
|
||||||
target_include_directories(eqlaunch PRIVATE ..)
|
|
||||||
|
|
||||||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||||
set_property(TARGET eqlaunch PROPERTY FOLDER executables/tools)
|
set_property(TARGET eqlaunch PROPERTY FOLDER executables/tools)
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
cmake_minimum_required(VERSION 3.20)
|
|
||||||
|
|
||||||
set(eqlogin_sources
|
set(eqlogin_sources
|
||||||
account_management.cpp
|
account_management.cpp
|
||||||
client.cpp
|
client.cpp
|
||||||
@@ -33,7 +31,6 @@ add_executable(loginserver ${eqlogin_sources} ${eqlogin_headers})
|
|||||||
install(TARGETS loginserver RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
install(TARGETS loginserver RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
|
|
||||||
target_link_libraries(loginserver common)
|
target_link_libraries(loginserver common)
|
||||||
target_include_directories(loginserver PRIVATE ..)
|
|
||||||
|
|
||||||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||||
set_property(TARGET loginserver PROPERTY FOLDER executables/servers)
|
set_property(TARGET loginserver PROPERTY FOLDER executables/servers)
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
cmake_minimum_required(VERSION 3.20)
|
|
||||||
|
|
||||||
set(qserv_sources
|
set(qserv_sources
|
||||||
database.cpp
|
database.cpp
|
||||||
lfguild.cpp
|
lfguild.cpp
|
||||||
@@ -26,7 +24,6 @@ install(TARGETS queryserv RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
|||||||
add_definitions(-DQSERV)
|
add_definitions(-DQSERV)
|
||||||
|
|
||||||
target_link_libraries(queryserv common)
|
target_link_libraries(queryserv common)
|
||||||
target_include_directories(queryserv PRIVATE ..)
|
|
||||||
|
|
||||||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||||
set_property(TARGET queryserv PROPERTY FOLDER executables/servers)
|
set_property(TARGET queryserv PROPERTY FOLDER executables/servers)
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
cmake_minimum_required(VERSION 3.17.0)
|
|
||||||
|
|
||||||
set(shared_memory_sources
|
set(shared_memory_sources
|
||||||
items.cpp
|
items.cpp
|
||||||
main.cpp
|
main.cpp
|
||||||
@@ -16,7 +14,6 @@ add_executable(shared_memory ${shared_memory_sources} ${shared_memory_headers})
|
|||||||
install(TARGETS shared_memory RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
install(TARGETS shared_memory RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
|
|
||||||
target_link_libraries(shared_memory common)
|
target_link_libraries(shared_memory common)
|
||||||
target_include_directories(shared_memory PRIVATE ..)
|
|
||||||
|
|
||||||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||||
set_property(TARGET shared_memory PROPERTY FOLDER executables/servers)
|
set_property(TARGET shared_memory PROPERTY FOLDER executables/servers)
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
cmake_minimum_required(VERSION 3.20.0)
|
|
||||||
|
|
||||||
add_subdirectory(cppunit)
|
add_subdirectory(cppunit)
|
||||||
|
|
||||||
set(tests_sources
|
set(tests_sources
|
||||||
@@ -22,7 +20,6 @@ set(tests_headers
|
|||||||
add_executable(tests ${tests_sources} ${tests_headers})
|
add_executable(tests ${tests_sources} ${tests_headers})
|
||||||
|
|
||||||
target_link_libraries(tests common cppunit)
|
target_link_libraries(tests common cppunit)
|
||||||
target_include_directories(tests PRIVATE ..)
|
|
||||||
|
|
||||||
install(TARGETS tests RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
install(TARGETS tests RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
cmake_minimum_required(VERSION 3.20.0)
|
|
||||||
|
|
||||||
set(cppunit_sources
|
set(cppunit_sources
|
||||||
collectoroutput.cpp
|
collectoroutput.cpp
|
||||||
compileroutput.cpp
|
compileroutput.cpp
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
cmake_minimum_required(VERSION 3.20)
|
|
||||||
|
|
||||||
set(ucs_sources
|
set(ucs_sources
|
||||||
chatchannel.cpp
|
chatchannel.cpp
|
||||||
clientlist.cpp
|
clientlist.cpp
|
||||||
@@ -24,7 +22,6 @@ install(TARGETS ucs RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
|||||||
add_definitions(-DUCS)
|
add_definitions(-DUCS)
|
||||||
|
|
||||||
target_link_libraries(ucs common)
|
target_link_libraries(ucs common)
|
||||||
target_include_directories(ucs PRIVATE ..)
|
|
||||||
|
|
||||||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||||
set_property(TARGET ucs PROPERTY FOLDER executables/servers)
|
set_property(TARGET ucs PROPERTY FOLDER executables/servers)
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
|
||||||
|
|
||||||
PROJECT(PFSUtil)
|
PROJECT(PFSUtil)
|
||||||
|
|
||||||
IF(NOT CMAKE_BUILD_TYPE)
|
IF(NOT CMAKE_BUILD_TYPE)
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
|
||||||
|
|
||||||
SET(common_sources
|
SET(common_sources
|
||||||
Source/PFSArchive.cpp
|
Source/PFSArchive.cpp
|
||||||
Source/Compression.cpp
|
Source/Compression.cpp
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
|
||||||
|
|
||||||
SET(pfslist_sources
|
SET(pfslist_sources
|
||||||
Source/main.cpp
|
Source/main.cpp
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ perl utils/scripts/build/tag-version.pl
|
|||||||
|
|
||||||
mkdir -p build && cd build && \
|
mkdir -p build && cd build && \
|
||||||
cmake -DEQEMU_BUILD_TESTS=ON \
|
cmake -DEQEMU_BUILD_TESTS=ON \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DEQEMU_BUILD_STATIC=ON \
|
-DEQEMU_BUILD_STATIC=ON \
|
||||||
-DEQEMU_BUILD_LOGIN=ON \
|
-DEQEMU_BUILD_LOGIN=ON \
|
||||||
-DEQEMU_BUILD_LUA=ON \
|
-DEQEMU_BUILD_LUA=ON \
|
||||||
-DEQEMU_BUILD_PERL=ON \
|
-DEQEMU_BUILD_PERL=ON \
|
||||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="-g -Wno-everything" \
|
-DCMAKE_CXX_FLAGS_RELEASE:STRING="-g -Wno-everything" \
|
||||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||||
-G 'Unix Makefiles' \
|
-G 'Unix Makefiles' \
|
||||||
.. && make -j$((`nproc`-2))
|
.. && make -j$((`nproc`-2))
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
cmake_minimum_required(VERSION 3.20)
|
|
||||||
|
|
||||||
set(world_sources
|
set(world_sources
|
||||||
adventure.cpp
|
adventure.cpp
|
||||||
adventure_manager.cpp
|
adventure_manager.cpp
|
||||||
@@ -96,9 +94,8 @@ add_executable(world ${world_sources} ${world_headers})
|
|||||||
target_compile_definitions(world PRIVATE WORLD)
|
target_compile_definitions(world PRIVATE WORLD)
|
||||||
|
|
||||||
target_link_libraries(world common)
|
target_link_libraries(world common)
|
||||||
target_include_directories(world PRIVATE ..)
|
|
||||||
|
|
||||||
if(WIN32 AND EQEMU_BUILD_PCH)
|
if(EQEMU_BUILD_PCH)
|
||||||
target_precompile_headers(world PRIVATE ../common/pch/std-pch.h)
|
target_precompile_headers(world PRIVATE ../common/pch/std-pch.h)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
cmake_minimum_required(VERSION 3.20)
|
|
||||||
|
|
||||||
set(zone_sources
|
set(zone_sources
|
||||||
aa.cpp
|
aa.cpp
|
||||||
aa_ability.cpp
|
aa_ability.cpp
|
||||||
@@ -271,7 +269,6 @@ add_library(lua_zone STATIC ${lua_sources})
|
|||||||
|
|
||||||
set_property(TARGET lua_zone PROPERTY FOLDER libraries)
|
set_property(TARGET lua_zone PROPERTY FOLDER libraries)
|
||||||
set_target_properties(lua_zone PROPERTIES UNITY_BUILD ON UNITY_BUILD_BATCH_SIZE 8)
|
set_target_properties(lua_zone PROPERTIES UNITY_BUILD ON UNITY_BUILD_BATCH_SIZE 8)
|
||||||
target_include_directories(lua_zone PRIVATE ..)
|
|
||||||
|
|
||||||
set(perl_sources
|
set(perl_sources
|
||||||
perl_bot.cpp
|
perl_bot.cpp
|
||||||
@@ -304,7 +301,6 @@ add_library(perl_zone STATIC ${perl_sources})
|
|||||||
set_property(TARGET perl_zone PROPERTY FOLDER libraries)
|
set_property(TARGET perl_zone PROPERTY FOLDER libraries)
|
||||||
set_target_properties(perl_zone PROPERTIES UNITY_BUILD ON UNITY_BUILD_BATCH_SIZE 8)
|
set_target_properties(perl_zone PROPERTIES UNITY_BUILD ON UNITY_BUILD_BATCH_SIZE 8)
|
||||||
target_link_libraries(perl_zone PUBLIC cereal::cereal fmt::fmt unofficial::libmariadb)
|
target_link_libraries(perl_zone PUBLIC cereal::cereal fmt::fmt unofficial::libmariadb)
|
||||||
target_include_directories(perl_zone PRIVATE ..)
|
|
||||||
|
|
||||||
set(gm_command_sources
|
set(gm_command_sources
|
||||||
bot_command.cpp
|
bot_command.cpp
|
||||||
@@ -668,7 +664,6 @@ source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Source Files" FILES ${gm
|
|||||||
|
|
||||||
add_library(gm_commands_zone STATIC ${gm_command_sources})
|
add_library(gm_commands_zone STATIC ${gm_command_sources})
|
||||||
target_link_libraries(gm_commands_zone PRIVATE common)
|
target_link_libraries(gm_commands_zone PRIVATE common)
|
||||||
target_include_directories(gm_commands_zone PRIVATE ..)
|
|
||||||
|
|
||||||
set_target_properties(gm_commands_zone PROPERTIES UNITY_BUILD ON UNITY_BUILD_BATCH_SIZE 32)
|
set_target_properties(gm_commands_zone PROPERTIES UNITY_BUILD ON UNITY_BUILD_BATCH_SIZE 32)
|
||||||
set_property(TARGET gm_commands_zone PROPERTY FOLDER libraries)
|
set_property(TARGET gm_commands_zone PROPERTY FOLDER libraries)
|
||||||
@@ -704,7 +699,6 @@ if(EQEMU_BUILD_PERL)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(zone PRIVATE gm_commands_zone common RecastNavigation::Detour)
|
target_link_libraries(zone PRIVATE gm_commands_zone common RecastNavigation::Detour)
|
||||||
target_include_directories(zone PRIVATE ..)
|
|
||||||
|
|
||||||
if(EQEMU_BUILD_LUA)
|
if(EQEMU_BUILD_LUA)
|
||||||
target_link_libraries(zone PRIVATE lua_zone)
|
target_link_libraries(zone PRIVATE lua_zone)
|
||||||
|
|||||||
Reference in New Issue
Block a user