From 6526d2d8b36231ab8321dfbd0e300340913a219d Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 1 Jun 2014 13:53:32 -0400 Subject: Fix Windows release build with gettext --- src/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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}) -- cgit