summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-06-01 13:53:32 -0400
committerAdam <Adam@anope.org>2014-06-01 13:53:32 -0400
commit6526d2d8b36231ab8321dfbd0e300340913a219d (patch)
tree0f2b77ad1109a0de5f1fcae18eb45b20b88a03d8 /src/CMakeLists.txt
parent76ab5c2c3882f760a30252bba119c2d1b75c8beb (diff)
Fix Windows release build with gettext
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3a07f7f13..6825ad6d2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -74,13 +74,14 @@ 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(MSVC)
set(WIN32_MEMORY)
endif(MSVC)
# 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 LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}" ENABLE_EXPORTS ON INSTALL_RPATH_USE_LINK_PATH ON BUILD_WITH_INSTALL_RPATH ON)
+set_target_properties(${PROGRAM_NAME} PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS} ${EXTRA_LDFLAGS}" ENABLE_EXPORTS ON INSTALL_RPATH_USE_LINK_PATH ON BUILD_WITH_INSTALL_RPATH ON)
# On Windows, also link Anope to the wsock32 and Ws2_32 library, as well as set the version
if(WIN32)
target_link_libraries(${PROGRAM_NAME} wsock32 Ws2_32 ${LINK_LIBS} ${GETTEXT_LIBRARIES} ${WIN32_MEMORY})