diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-03-25 17:36:47 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-03-25 17:36:47 +0000 |
commit | 60b18508e094dc4721a3e6090ff86f2e992d2984 (patch) | |
tree | 3f4032df12a9deee82476d8904cfeb8b224ae0d3 /src | |
parent | 8fc031fb84e7e266fbdf476b59d97f529c28dc36 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/CMakeLists.txt | 8 |
1 files changed, 4 insertions, 4 deletions
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 |