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

Fix problem with CMake under Windows, spotted by therock247uk on the forums, CMake now checks for the environment variable VCINSTALLDIR (only set in the Visual Studio command prompt) and also fixes the check for #ifndef.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2207 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
cyberbotx
2009-03-25 17:36:47 +00:00
parent 8fc031fb84
commit 60b18508e0
2 changed files with 17 additions and 17 deletions
+4 -4
View File
@@ -46,11 +46,11 @@ foreach(SRC ${MODULES_SRCS})
# Iterate through the libraries given
foreach(LIBRARY ${REQUIRED_LIBRARY})
# Locate the library to see if it exists
if(DEFAULT_LIBRARY_DIRS OR WSDK_PATH)
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib)
else(DEFAULT_LIBRARY_DIRS OR WSDK_PATH)
if(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib)
else(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY})
endif(DEFAULT_LIBRARY_DIRS OR WSDK_PATH)
endif(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
# If the library was found, we will add it to the linker flags
if(FOUND_${LIBRARY}_LIBRARY)
# Get the path only of the library, to add it to linker flags