More cleanup

This commit is contained in:
KimLS 2025-11-22 22:34:32 -08:00
parent 1168d3bc37
commit 3f8746d33c
12 changed files with 106 additions and 105 deletions

View File

@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
cmake_minimum_required(VERSION 3.20)
add_subdirectory(import)
add_subdirectory(export)

View File

@ -1,16 +1,16 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.17.0)
cmake_minimum_required(VERSION 3.20.0)
SET(export_sources
set(export_sources
main.cpp
)
SET(export_headers
set(export_headers
)
ADD_EXECUTABLE(export_client_files ${export_sources} ${export_headers})
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 ${SERVER_LIBS})
target_link_libraries(export_client_files ${SERVER_LIBS})
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)

View File

@ -1,16 +1,16 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.17.0)
cmake_minimum_required(VERSION 3.20.0)
SET(import_sources
set(import_sources
main.cpp
)
SET(import_headers
set(import_headers
)
ADD_EXECUTABLE(import_client_files ${import_sources} ${import_headers})
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 ${SERVER_LIBS})
target_link_libraries(import_client_files ${SERVER_LIBS})
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)

View File

@ -1,20 +1,20 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
cmake_minimum_required(VERSION 3.20)
SET(eqlaunch_sources
set(eqlaunch_sources
eqlaunch.cpp
worldserver.cpp
zone_launch.cpp
)
SET(eqlaunch_headers
set(eqlaunch_headers
worldserver.h
zone_launch.h
)
ADD_EXECUTABLE(eqlaunch ${eqlaunch_sources} ${eqlaunch_headers})
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 ${SERVER_LIBS})
target_link_libraries(eqlaunch ${SERVER_LIBS})
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)

View File

@ -1,6 +1,6 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
cmake_minimum_required(VERSION 3.20)
SET(eqlogin_sources
set(eqlogin_sources
account_management.cpp
client.cpp
client_manager.cpp
@ -12,7 +12,7 @@ SET(eqlogin_sources
world_server.cpp
)
SET(eqlogin_headers
set(eqlogin_headers
account_management.h
client.h
client_manager.h
@ -26,10 +26,10 @@ SET(eqlogin_headers
world_server.h
)
ADD_EXECUTABLE(loginserver ${eqlogin_sources} ${eqlogin_headers})
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 ${SERVER_LIBS})
target_link_libraries(loginserver ${SERVER_LIBS})
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)

View File

@ -1,6 +1,6 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
cmake_minimum_required(VERSION 3.20)
SET(qserv_sources
set(qserv_sources
database.cpp
lfguild.cpp
queryserv.cpp
@ -10,7 +10,7 @@ SET(qserv_sources
zoneserver.cpp
)
SET(qserv_headers
set(qserv_headers
database.h
lfguild.h
queryservconfig.h
@ -19,12 +19,12 @@ SET(qserv_headers
zoneserver.h
)
ADD_EXECUTABLE(queryserv ${qserv_sources} ${qserv_headers})
add_executable(queryserv ${qserv_sources} ${qserv_headers})
INSTALL(TARGETS queryserv RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(TARGETS queryserv RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
ADD_DEFINITIONS(-DQSERV)
add_definitions(-DQSERV)
TARGET_LINK_LIBRARIES(queryserv ${SERVER_LIBS})
target_link_libraries(queryserv ${SERVER_LIBS})
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)

View File

@ -1,20 +1,20 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.17.0)
cmake_minimum_required(VERSION 3.17.0)
SET(shared_memory_sources
set(shared_memory_sources
items.cpp
main.cpp
spells.cpp
)
SET(shared_memory_headers
set(shared_memory_headers
items.h
spells.h
)
ADD_EXECUTABLE(shared_memory ${shared_memory_sources} ${shared_memory_headers})
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 ${SERVER_LIBS})
target_link_libraries(shared_memory ${SERVER_LIBS})
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)

View File

@ -1,12 +1,12 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.17.0)
cmake_minimum_required(VERSION 3.20.0)
ADD_SUBDIRECTORY(cppunit)
add_subdirectory(cppunit)
SET(tests_sources
set(tests_sources
main.cpp
)
SET(tests_headers
set(tests_headers
atobool_test.h
data_verification_test.h
fixed_memory_test.h
@ -19,30 +19,30 @@ SET(tests_headers
task_state_test.h
)
ADD_EXECUTABLE(tests ${tests_sources} ${tests_headers})
add_executable(tests ${tests_sources} ${tests_headers})
TARGET_LINK_LIBRARIES(tests common cppunit ${SERVER_LIBS})
target_link_libraries(tests common cppunit ${SERVER_LIBS})
INSTALL(TARGETS tests RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(TARGETS tests RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
IF(MSVC)
SET_TARGET_PROPERTIES(tests PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF")
TARGET_LINK_LIBRARIES(tests "Ws2_32.lib")
ENDIF(MSVC)
if(MSVC)
set_target_properties(tests PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF")
target_link_libraries(tests "Ws2_32.lib")
endif()
IF(MINGW)
TARGET_LINK_LIBRARIES(tests "WS2_32")
ENDIF(MINGW)
if(MINGW)
target_link_libraries(tests "WS2_32")
endif()
IF(UNIX)
TARGET_LINK_LIBRARIES(tests "${CMAKE_DL_LIBS}")
TARGET_LINK_LIBRARIES(tests "z")
TARGET_LINK_LIBRARIES(tests "m")
IF(NOT DARWIN)
TARGET_LINK_LIBRARIES(tests "rt")
ENDIF(NOT DARWIN)
TARGET_LINK_LIBRARIES(tests "pthread")
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)
if(UNIX)
target_link_libraries(tests "${CMAKE_DL_LIBS}")
target_link_libraries(tests "z")
target_link_libraries(tests "m")
if(NOT DARWIN)
target_link_libraries(tests "rt")
endif()
target_link_libraries(tests "pthread")
add_definitions(-fPIC)
endif()
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)

View File

@ -1,6 +1,6 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.17.0)
cmake_minimum_required(VERSION 3.20.0)
SET(cppunit_sources
set(cppunit_sources
collectoroutput.cpp
compileroutput.cpp
htmloutput.cpp
@ -12,7 +12,7 @@ SET(cppunit_sources
utils.cpp
)
SET(cppunit_headers
set(cppunit_headers
cpptest-assert.h
cpptest-collectoroutput.h
cpptest-compileroutput.h
@ -28,11 +28,11 @@ SET(cppunit_headers
winconfig.h
)
ADD_LIBRARY(cppunit ${cppunit_sources} ${cppunit_headers})
add_library(cppunit ${cppunit_sources} ${cppunit_headers})
IF(UNIX)
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)
if(UNIX)
add_definitions(-fPIC)
endif()
SET(LIBRARY_OUTPUT_PATH ../../bin)
set(LIBRARY_OUTPUT_PATH ../../bin)

View File

@ -1,5 +1,6 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
SET(ucs_sources
cmake_minimum_required(VERSION 3.20)
set(ucs_sources
chatchannel.cpp
clientlist.cpp
database.cpp
@ -8,7 +9,7 @@ SET(ucs_sources
worldserver.cpp
)
SET(ucs_headers
set(ucs_headers
chatchannel.h
clientlist.h
database.h
@ -16,12 +17,12 @@ SET(ucs_headers
worldserver.h
)
ADD_EXECUTABLE(ucs ${ucs_sources} ${ucs_headers})
add_executable(ucs ${ucs_sources} ${ucs_headers})
INSTALL(TARGETS ucs RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(TARGETS ucs RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
ADD_DEFINITIONS(-DUCS)
add_definitions(-DUCS)
TARGET_LINK_LIBRARIES(ucs ${SERVER_LIBS})
target_link_libraries(ucs ${SERVER_LIBS})
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)

View File

@ -1,6 +1,6 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
cmake_minimum_required(VERSION 3.20)
SET(world_sources
set(world_sources
adventure.cpp
adventure_manager.cpp
client.cpp
@ -35,7 +35,7 @@ SET(world_sources
zoneserver.cpp
)
SET(world_headers
set(world_headers
adventure.h
adventure_manager.h
adventure_template.h
@ -72,16 +72,16 @@ SET(world_headers
zoneserver.h
)
ADD_EXECUTABLE(world ${world_sources} ${world_headers})
add_executable(world ${world_sources} ${world_headers})
INSTALL(TARGETS world RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(TARGETS world RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
IF (WIN32 AND EQEMU_BUILD_PCH)
if(WIN32 AND EQEMU_BUILD_PCH)
TARGET_PRECOMPILE_HEADERS(world PRIVATE ../common/pch/std-pch.h)
ENDIF ()
endif()
ADD_DEFINITIONS(-DWORLD)
add_definitions(-DWORLD)
TARGET_LINK_LIBRARIES(world ${SERVER_LIBS})
target_link_libraries(world ${SERVER_LIBS})
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)

View File

@ -1,6 +1,6 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
cmake_minimum_required(VERSION 3.20)
SET(zone_sources
set(zone_sources
aa.cpp
aa_ability.cpp
aggro.cpp
@ -121,7 +121,7 @@ SET(zone_sources
zoning.cpp
)
SET(zone_headers
set(zone_headers
aa.h
aa_ability.h
aggromanager.h
@ -476,24 +476,24 @@ target_link_libraries(gm_commands_zone PRIVATE cereal::cereal fmt::fmt $<IF:$<TA
set_target_properties(gm_commands_zone PROPERTIES UNITY_BUILD ON UNITY_BUILD_BATCH_SIZE 32)
# zone combine sources and headers
ADD_EXECUTABLE(zone ${zone_sources} ${zone_headers})
add_executable(zone ${zone_sources} ${zone_headers})
# binary output directory
INSTALL(TARGETS zone RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(TARGETS zone RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
# precompiled headers
IF (EQEMU_BUILD_PCH)
if(EQEMU_BUILD_PCH)
TARGET_PRECOMPILE_HEADERS(zone PRIVATE ../common/pch/app-pch.h)
TARGET_PRECOMPILE_HEADERS(zone PRIVATE ../common/pch/std-pch.h)
TARGET_PRECOMPILE_HEADERS(zone PRIVATE ./pch/pch.h)
ENDIF()
endif()
ADD_DEFINITIONS(-DZONE)
add_definitions(-DZONE)
# link lua_zone unity build against luabind
IF(MSVC)
if(MSVC)
target_compile_options(lua_zone PRIVATE /utf-8)
ENDIF(MSVC)
endif()
target_link_libraries(lua_zone PRIVATE luabind Boost::dynamic_bitset Boost::tuple Boost::foreach unofficial::libmariadb)
if (EQEMU_BUILD_STATIC AND LUA_LIBRARY)