1
0
mirror of https://github.com/anope/anope.git synced 2026-07-10 09:23:14 +02:00

Clean up more obsolete build system cruft.

This commit is contained in:
Sadie Powell
2025-11-18 02:42:47 +00:00
parent 838de2f5b8
commit 6e151a693a
6 changed files with 30 additions and 38 deletions
+9 -5
View File
@@ -39,18 +39,22 @@ if(MSVC)
set_source_files_properties(win32/win32_memory.cpp PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
add_library(win32_memory STATIC win32/win32_memory.cpp)
set(WIN32_MEMORY win32_memory)
set(EXTRA_LDFLAGS "/OPT:NOREF") # https://sourceware.org/bugzilla/show_bug.cgi?id=12633
else()
set(WIN32_MEMORY)
endif()
# Generate the Anope executable and set it's linker flags, also set it to export it's symbols even though it's not a module
add_executable(${PROGRAM_NAME} ${SRC_SRCS})
set_target_properties(${PROGRAM_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS} ${EXTRA_LDFLAGS}" ENABLE_EXPORTS ON INSTALL_RPATH_USE_LINK_PATH ON BUILD_WITH_INSTALL_RPATH ON)
set_target_properties(${PROGRAM_NAME} PROPERTIES
BUILD_WITH_INSTALL_RPATH ON
ENABLE_EXPORTS ON
INSTALL_RPATH_USE_LINK_PATH ON
LINK_FLAGS "${LDFLAGS}"
)
# On Windows, also link Anope to the wsock32 and Ws2_32 library, as well as set the version
# On Windows, also link Anope to the Winsock library
if(WIN32)
target_link_libraries(${PROGRAM_NAME} PUBLIC wsock32 Ws2_32 ${LINK_LIBS} ${WIN32_MEMORY})
target_link_libraries(${PROGRAM_NAME} PUBLIC "Ws2_32" ${LINK_LIBS} ${WIN32_MEMORY})
set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}")
else()
target_link_libraries(${PROGRAM_NAME} PUBLIC ${LINK_LIBS})
@@ -70,7 +74,7 @@ endif()
# Get the filename of the Anope executable as it is in on this system
set(SERVICES_BINARY "$<TARGET_FILE:${PROGRAM_NAME}>")
get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME)
cmake_path(GET SERVICES_BINARY FILENAME SERVICES_BINARY)
# Add the Anope executable to the list of files for CPack to ignore
add_to_cpack_ignored_files("${SERVICES_BINARY}$" TRUE)
+3 -2
View File
@@ -22,7 +22,7 @@ foreach(SRC ${TOOLS_SRCS})
)
# Add the executable to the list of files for CPack to ignore
set(EXE_BINARY "$<TARGET_FILE:${EXE}>")
get_filename_component(EXE_BINARY ${EXE_BINARY} NAME)
cmake_path(GET EXE_BINARY FILENAME EXE_BINARY)
add_to_cpack_ignored_files("${EXE_BINARY}$" TRUE)
endif()
endforeach()
@@ -38,7 +38,8 @@ if(NOT WIN32)
endif()
configure_file(${Anope_SOURCE_DIR}/src/tools/anoperc.in ${Anope_BINARY_DIR}/src/tools/anoperc)
install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/anoperc
install(
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/anoperc
DESTINATION ${BIN_DIR}
)
endif()