From 60b18508e094dc4721a3e6090ff86f2e992d2984 Mon Sep 17 00:00:00 2001 From: cyberbotx Date: Wed, 25 Mar 2009 17:36:47 +0000 Subject: 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 --- src/modules/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules') diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt index 21b35c0b3..7a62f9970 100644 --- a/src/modules/CMakeLists.txt +++ b/src/modules/CMakeLists.txt @@ -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 -- cgit