summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-05-30 15:45:57 -0400
committerAdam <Adam@anope.org>2014-05-30 18:14:55 -0400
commitf20bac996da46556a821c1b0244a202e652fe247 (patch)
tree438bfc81c3094163bd37f552cac0f5acc335c58a /cmake
parent93bfd4cbe1674c063dca17e7176364f30348eb7c (diff)
Fix Windows build and update library names to the newer ones.
Also fix crash on Windows when unloading a module because it threw an exception.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Anope.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/cmake/Anope.cmake b/cmake/Anope.cmake
index 587e32980..4c71d132c 100644
--- a/cmake/Anope.cmake
+++ b/cmake/Anope.cmake
@@ -432,11 +432,15 @@ macro(calculate_libraries SRC SRC_LDFLAGS EXTRA_DEPENDS)
# Reset libraries
set(LIBRARIES)
# Check to see if there are any lines matching: /* RequiredLibraries: [something] */
- read_from_file(${SRC} "/\\\\*[ \t]*RequiredLibraries:[ \t]*.*[ \t]*\\\\*/" REQUIRED_LIBRARIES)
+ if(WIN32)
+ read_from_file(${SRC} "/\\\\*[ \t]*RequiredWindowsLibraries:[ \t]*.*[ \t]*\\\\*/" REQUIRED_LIBRARIES)
+ else(WIN32)
+ read_from_file(${SRC} "/\\\\*[ \t]*RequiredLibraries:[ \t]*.*[ \t]*\\\\*/" REQUIRED_LIBRARIES)
+ endif(WIN32)
# Iterate through those lines
foreach(REQUIRED_LIBRARY ${REQUIRED_LIBRARIES})
# Strip off the /* RequiredLibraries: and */ from the line
- string(REGEX REPLACE "/\\*[ \t]*RequiredLibraries:[ \t]*([^ \t]*)[ \t]*\\*/" "\\1" REQUIRED_LIBRARY ${REQUIRED_LIBRARY})
+ string(REGEX REPLACE "/\\*[ \t]*Required.*Libraries:[ \t]*([^ \t]*)[ \t]*\\*/" "\\1" REQUIRED_LIBRARY ${REQUIRED_LIBRARY})
# Replace all commas with semicolons
string(REGEX REPLACE "," ";" REQUIRED_LIBRARY ${REQUIRED_LIBRARY})
# Iterate through the libraries given