Skip to content

Commit 145ed8f

Browse files
committed
Merge remote-tracking branch 'upstream/2.0' into 2.0
2 parents 1508f47 + c6065ff commit 145ed8f

File tree

6 files changed

+24
-24
lines changed

6 files changed

+24
-24
lines changed

CMakeLists.txt

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
# This usage of CMake requires at least version 2.4 (checks are made to determine what to use when certain versions lack functions)
2-
cmake_minimum_required(VERSION 2.4 FATAL_ERROR)
3-
if(COMMAND cmake_policy)
4-
cmake_policy(SET CMP0003 NEW)
5-
if(POLICY CMP0026)
6-
cmake_policy(SET CMP0026 OLD)
7-
endif(POLICY CMP0026)
8-
if(POLICY CMP0007)
9-
cmake_policy(SET CMP0007 OLD)
10-
endif(POLICY CMP0007)
11-
endif(COMMAND cmake_policy)
2+
cmake_minimum_required(VERSION 2.4...3.20 FATAL_ERROR)
123

134
# Set the project as C++ primarily, but have C enabled for the checks required later
145
project(Anope CXX)
@@ -422,7 +413,6 @@ read_from_file(${Anope_SOURCE_DIR}/src/version.sh "^VERSION_" VERSIONS)
422413
# Iterate through the strings found
423414
foreach(VERSION_STR ${VERSIONS})
424415
string(REGEX REPLACE "^VERSION_([A-Z]+)=\"?([^\"]*)\"?$" "\\1;\\2" VERSION_OUT ${VERSION_STR})
425-
# Depends on CMP0007 OLD
426416
list(LENGTH VERSION_OUT VERSION_LEN)
427417
list(GET VERSION_OUT 0 VERSION_TYPE)
428418
if(${VERSION_LEN} GREATER 1)
@@ -479,16 +469,8 @@ if(${Anope_SOURCE_DIR} STREQUAL ${Anope_BINARY_DIR})
479469
endif(MSVC)
480470
endif(${Anope_SOURCE_DIR} STREQUAL ${Anope_BINARY_DIR})
481471

482-
# Go into the following directories and run their CMakeLists.txt as well
483-
add_subdirectory(data)
484-
add_subdirectory(docs)
485-
add_subdirectory(language)
486-
add_subdirectory(src)
487-
add_subdirectory(modules)
488-
add_subdirectory(include)
489-
490472
# Get the filename of the Anope binary, to use later
491-
get_target_property(SERVICES_BINARY ${PROGRAM_NAME} LOCATION)
473+
set(SERVICES_BINARY "$<TARGET_FILE:${PROGRAM_NAME}>")
492474
get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME)
493475

494476
# At install time, create the following additional directories
@@ -556,3 +538,12 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
556538
set(CPACK_MONOLITHIC_INSTALL TRUE)
557539
include(CPack)
558540
endif(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
541+
542+
# Go into the following directories and run their CMakeLists.txt as well
543+
add_subdirectory(data)
544+
add_subdirectory(docs)
545+
add_subdirectory(language)
546+
add_subdirectory(src)
547+
add_subdirectory(modules)
548+
add_subdirectory(include)
549+

docs/Changes

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Anope Version 2.0.18-git
22
------------------------
3-
No significant changes.
3+
Backported better sendmail error messages from 2.1.
4+
Fixed building Anope with CMake 4.
5+
Fixed compatibility with MariaDB.
6+
Fixed counting email addresses in ns_maxemail.
7+
Fixed importing user ICQ and URL data from 1.8.
8+
Fixed operserv/ignore not being prioritised first.
9+
Fixed resetting the stats with operserv/stats.
10+
Updated the Dutch translation.
411

512
Anope Version 2.0.17
613
--------------------

include/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set_source_files_properties(version.cpp PROPERTIES LANGUAGE CXX COMPILE_FLAGS "$
33
# Generate version-bin executable to modify version.h, setting it's linker flags as well
44
add_executable(version-bin version.cpp)
55
set_target_properties(version-bin PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}")
6-
get_target_property(version_BINARY version-bin LOCATION)
6+
set(version_BINARY "$<TARGET_FILE:version-bin>")
77
# Modify version.h from the above executable, with dependencies to version.cpp
88
# and all of the source files in the main build
99
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/build.h

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ if(GETTEXT_FOUND)
9797
endif(GETTEXT_FOUND)
9898

9999
# Get the filename of the Anope executable as it is in on this system
100-
get_target_property(SERVICES_BINARY ${PROGRAM_NAME} LOCATION)
100+
set(SERVICES_BINARY "$<TARGET_FILE:${PROGRAM_NAME}>")
101101
get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME)
102102
# Add the Anope executable to the list of files for CPack to ignore
103103
add_to_cpack_ignored_files("${SERVICES_BINARY}$" TRUE)

src/mail.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* Based on the original code of Services by Andy Church.
1010
*/
1111

12+
#include <cerrno>
13+
1214
#include "services.h"
1315
#include "mail.h"
1416
#include "config.h"

src/tools/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ foreach(SRC ${TOOLS_SRCS})
2929
DESTINATION ${BIN_DIR}
3030
)
3131
# Add the executable to the list of files for CPack to ignore
32-
get_target_property(EXE_BINARY ${EXE} LOCATION)
32+
set(EXE_BINARY "$<TARGET_FILE:${EXE}>")
3333
get_filename_component(EXE_BINARY ${EXE_BINARY} NAME)
3434
add_to_cpack_ignored_files("${EXE_BINARY}$" TRUE)
3535
endif(NOT SKIP)

0 commit comments

Comments
 (0)