diff --git a/client_files/CMakeLists.txt b/client_files/CMakeLists.txt index d4b5962e3..2fec654cf 100644 --- a/client_files/CMakeLists.txt +++ b/client_files/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +cmake_minimum_required(VERSION 3.20) add_subdirectory(import) add_subdirectory(export) diff --git a/client_files/export/CMakeLists.txt b/client_files/export/CMakeLists.txt index 985a18b79..a127963b6 100644 --- a/client_files/export/CMakeLists.txt +++ b/client_files/export/CMakeLists.txt @@ -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) diff --git a/client_files/import/CMakeLists.txt b/client_files/import/CMakeLists.txt index 673f6ec7f..2643090af 100644 --- a/client_files/import/CMakeLists.txt +++ b/client_files/import/CMakeLists.txt @@ -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) diff --git a/eqlaunch/CMakeLists.txt b/eqlaunch/CMakeLists.txt index 4fde2c222..f0cdc987d 100644 --- a/eqlaunch/CMakeLists.txt +++ b/eqlaunch/CMakeLists.txt @@ -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) diff --git a/loginserver/CMakeLists.txt b/loginserver/CMakeLists.txt index 5f2b43248..67729481b 100644 --- a/loginserver/CMakeLists.txt +++ b/loginserver/CMakeLists.txt @@ -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) diff --git a/queryserv/CMakeLists.txt b/queryserv/CMakeLists.txt index 82613065a..093fa0bc1 100644 --- a/queryserv/CMakeLists.txt +++ b/queryserv/CMakeLists.txt @@ -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) diff --git a/shared_memory/CMakeLists.txt b/shared_memory/CMakeLists.txt index 7c62403bd..92e8d17d6 100644 --- a/shared_memory/CMakeLists.txt +++ b/shared_memory/CMakeLists.txt @@ -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) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2310d765a..e38dc7066 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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) diff --git a/tests/cppunit/CMakeLists.txt b/tests/cppunit/CMakeLists.txt index e8f602d82..a6f82df87 100644 --- a/tests/cppunit/CMakeLists.txt +++ b/tests/cppunit/CMakeLists.txt @@ -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) diff --git a/ucs/CMakeLists.txt b/ucs/CMakeLists.txt index 660d168d8..e4238b0dd 100644 --- a/ucs/CMakeLists.txt +++ b/ucs/CMakeLists.txt @@ -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) diff --git a/world/CMakeLists.txt b/world/CMakeLists.txt index 1963c83ae..273a0a375 100644 --- a/world/CMakeLists.txt +++ b/world/CMakeLists.txt @@ -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) diff --git a/zone/CMakeLists.txt b/zone/CMakeLists.txt index 6e1cb4743..2edc24992 100644 --- a/zone/CMakeLists.txt +++ b/zone/CMakeLists.txt @@ -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 $