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 /Anope.cmake | |
| 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 'Anope.cmake')
| -rw-r--r-- | Anope.cmake | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Anope.cmake b/Anope.cmake index ef65641be..6a2f0d6a7 100644 --- a/Anope.cmake +++ b/Anope.cmake @@ -316,21 +316,21 @@ macro(find_includes SRC INCLUDES) set(LAST_DEF ${DEFINE}) set(LAST_CHECK FALSE) # If the define is not true (it either doesn't exists or is a false result), the lines following will be checked, otherwise they will be skipped - if(NOT ${DEFINE}) - set(VALID_LINE TRUE) - else(NOT ${DEFINE}) - set(VALUE_LINE FALSE) - endif(NOT ${DEFINE}) + if(${DEFINE}) + set(VALID_LINE FALSE) + else(${DEFINE}) + set(VALUE_LINE TRUE) + endif(${DEFINE}) else(FOUND_IFNDEF) # If we found a #else on the line, we check the last define in the opposite direction if(FOUND_ELSE) # When LAST_CHECK is true, we were inside a #ifdef, now act as if we are entering a #ifndef section by doing an opposing check if(LAST_CHECK) - if(NOT ${LAST_DEF}) - set(VALID_LINE TRUE) - else(NOT ${LAST_DEF}) + if(${LAST_DEF}) set(VALID_LINE FALSE) - endif(NOT ${LAST_DEF}) + else(${LAST_DEF}) + set(VALID_LINE TRUE) + endif(${LAST_DEF}) # When LAST_CHECK is false, we were inside a #ifndef, now act as if we are entering a #ifdef section by doing an opposing check else(LAST_CHECK) if(${LAST_DEF}) @@ -386,11 +386,11 @@ macro(calculate_depends SRC) # The following checks will only be done if there was a request for angle includes to be checked if(CHECK_ANGLE_INCLUDES) # Find the path of the include file - if(DEFAULT_INCLUDE_DIRS OR WSDK_PATH) - find_path(FOUND_${FILENAME}_INCLUDE NAMES ${FILENAME} PATHS ${DEFAULT_INCLUDE_DIRS} ${WSDK_PATH}/include) - else(DEFAULT_INCLUDE_DIRS OR WSDK_PATH) + if(DEFAULT_INCLUDE_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR}) + find_path(FOUND_${FILENAME}_INCLUDE NAMES ${FILENAME} PATHS ${DEFAULT_INCLUDE_DIRS} ${WSDK_PATH}/include $ENV{VCINSTALLDIR}/include) + else(DEFAULT_INCLUDE_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR}) find_path(FOUND_${FILENAME}_INCLUDE NAMES ${FILENAME}) - endif(DEFAULT_INCLUDE_DIRS OR WSDK_PATH) + endif(DEFAULT_INCLUDE_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR}) # If the include file was found, add it's path to the list of include paths, but only if it doesn't already exist and isn't in the defaults for the compiler if(FOUND_${FILENAME}_INCLUDE) find_in_list(DEFAULT_INCLUDE_DIRS "${FOUND_${FILENAME}_INCLUDE}" FOUND_IN_DEFAULTS) |
