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:
+9
-5
@@ -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)
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user