aboutsummaryrefslogtreecommitdiff
path: root/cmake/Modules
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cynapses.org>2010-12-30 00:26:37 +0100
committerAndreas Schneider <asn@cynapses.org>2010-12-30 00:26:37 +0100
commit1646ce970cad7934a0dd661045fc323c649df61e (patch)
tree8a3b760127c797eb98efd439337abb03529a91e0 /cmake/Modules
parent08906e0f7f28e5e90918d95a5bf0acf4f5a4982d (diff)
downloadlibssh-1646ce970cad7934a0dd661045fc323c649df61e.tar.gz
libssh-1646ce970cad7934a0dd661045fc323c649df61e.tar.xz
libssh-1646ce970cad7934a0dd661045fc323c649df61e.zip
cmake: Fixed find modules on Windows.
Diffstat (limited to 'cmake/Modules')
-rw-r--r--cmake/Modules/FindCMockery.cmake5
-rw-r--r--cmake/Modules/FindGCrypt.cmake4
-rw-r--r--cmake/Modules/FindNSIS.cmake27
-rw-r--r--cmake/Modules/FindOpenSSL.cmake8
-rw-r--r--cmake/Modules/FindZLIB.cmake7
5 files changed, 25 insertions, 26 deletions
diff --git a/cmake/Modules/FindCMockery.cmake b/cmake/Modules/FindCMockery.cmake
index 2464049..49460ad 100644
--- a/cmake/Modules/FindCMockery.cmake
+++ b/cmake/Modules/FindCMockery.cmake
@@ -18,9 +18,6 @@ if (CMOCKERY_LIBRARIES AND CMOCKERY_INCLUDE_DIRS)
# in cache already
set(CMOCKERY_FOUND TRUE)
else (CMOCKERY_LIBRARIES AND CMOCKERY_INCLUDE_DIRS)
- if (WIN32)
- set(_CMOCKERY_DIR $ENV{PROGRAMFILES}/cmockery)
- endif (WIN32)
find_path(CMOCKERY_INCLUDE_DIR
NAMES
@@ -31,6 +28,7 @@ else (CMOCKERY_LIBRARIES AND CMOCKERY_INCLUDE_DIRS)
/usr/local/include
/opt/local/include
/sw/include
+ $ENV{PROGRAMFILES}/cmockery/include
)
find_library(CMOCKERY_LIBRARY
@@ -42,6 +40,7 @@ else (CMOCKERY_LIBRARIES AND CMOCKERY_INCLUDE_DIRS)
/usr/local/lib
/opt/local/lib
/sw/lib
+ $ENV{PROGRAMFILES}/cmockery/lib
)
set(CMOCKERY_INCLUDE_DIRS
diff --git a/cmake/Modules/FindGCrypt.cmake b/cmake/Modules/FindGCrypt.cmake
index 71edd32..3bab9a1 100644
--- a/cmake/Modules/FindGCrypt.cmake
+++ b/cmake/Modules/FindGCrypt.cmake
@@ -23,23 +23,27 @@ else (GCRYPT_LIBRARIES AND GCRYPT_INCLUDE_DIRS)
NAMES
gcrypt.h
PATHS
+ ${_GCRYPT_DIR}/include
/usr/include
/usr/local/include
/opt/local/include
/sw/include
/usr/lib/sfw/include
+ $ENV{PROGRAMFILES}/GnuWin32/include
)
find_library(GCRYPT_LIBRARY
NAMES
gcrypt
PATHS
+ ${_GCRYPT_DIR}/lib
/usr/lib
/usr/local/lib
/opt/local/lib
/sw/lib
/usr/sfw/lib/64
/usr/sfw/lib
+ $ENV{PROGRAMFILES}/GnuWin32/lib
)
set(GCRYPT_INCLUDE_DIRS
diff --git a/cmake/Modules/FindNSIS.cmake b/cmake/Modules/FindNSIS.cmake
index c391043..c92c240 100644
--- a/cmake/Modules/FindNSIS.cmake
+++ b/cmake/Modules/FindNSIS.cmake
@@ -11,21 +11,16 @@
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
-if (NSIS_MAKE)
- # in cache already
- set(NSIS_FOUND TRUE)
-elseif (NSIS_MAKE)
- find_program(NSIS_MAKE
- NAMES
- makensis
- PATHS
- ${_NSIS_DIR}
- ${_NSIS_DIR}/Bin
- $ENV{PROGRAMFILES}/NSIS
- )
+find_program(NSIS_MAKE
+ NAMES
+ makensis
+ PATHS
+ ${_NSIS_DIR}
+ ${_NSIS_DIR}/Bin
+ $ENV{PROGRAMFILES}/NSIS
+)
- include(FindPackageHandleStandardArgs)
- find_package_handle_standard_args(NSIS DEFAULT_MSG NSIS_MAKE)
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(NSIS DEFAULT_MSG NSIS_MAKE)
- mark_as_advanced(NSIS_MAKE)
-endif (NSIS_MAKE)
+mark_as_advanced(NSIS_MAKE)
diff --git a/cmake/Modules/FindOpenSSL.cmake b/cmake/Modules/FindOpenSSL.cmake
index b024ff4..50b65c2 100644
--- a/cmake/Modules/FindOpenSSL.cmake
+++ b/cmake/Modules/FindOpenSSL.cmake
@@ -13,14 +13,10 @@
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
-
if (OPENSSL_LIBRARIES AND OPENSSL_INCLUDE_DIRS)
# in cache already
set(OPENSSL_FOUND TRUE)
else (OPENSSL_LIBRARIES AND OPENSSL_INCLUDE_DIRS)
- if (WIN32)
- set(_OPENSSL_DIR $ENV{PROGRAMFILES}/OpenSSL)
- endif (WIN32)
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
@@ -38,6 +34,8 @@ else (OPENSSL_LIBRARIES AND OPENSSL_INCLUDE_DIRS)
/opt/local/include
/sw/include
/usr/lib/sfw/include
+ $ENV{PROGRAMFILES}/OpenSSL/include
+ $ENV{PROGRAMFILES}/OpenSSL-Win32/include
)
find_library(SSL_LIBRARY
@@ -53,6 +51,8 @@ else (OPENSSL_LIBRARIES AND OPENSSL_INCLUDE_DIRS)
/sw/lib
/usr/sfw/lib/64
/usr/sfw/lib
+ $ENV{PROGRAMFILES}/OpenSSL/lib
+ $ENV{PROGRAMFILES}/OpenSSL-Win32/lib
)
find_library(SSLEAY32_LIBRARY
diff --git a/cmake/Modules/FindZLIB.cmake b/cmake/Modules/FindZLIB.cmake
index a9fdfa9..f0b969c 100644
--- a/cmake/Modules/FindZLIB.cmake
+++ b/cmake/Modules/FindZLIB.cmake
@@ -18,9 +18,6 @@ if (ZLIB_LIBRARIES AND ZLIB_INCLUDE_DIRS)
# in cache already
set(ZLIB_FOUND TRUE)
else (ZLIB_LIBRARIES AND ZLIB_INCLUDE_DIRS)
- if (WIN32)
- set(_ZLIB_DIR $ENV{PROGRAMFILES}/GnuWin32)
- endif (WIN32)
find_path(ZLIB_INCLUDE_DIR
NAMES
@@ -32,6 +29,8 @@ else (ZLIB_LIBRARIES AND ZLIB_INCLUDE_DIRS)
/opt/local/include
/sw/include
/usr/lib/sfw/include
+ $ENV{PROGRAMFILES}/GnuWin32/include
+ $ENV{PROGRAMFILES}/zlib/include
)
find_library(Z_LIBRARY
@@ -47,6 +46,8 @@ else (ZLIB_LIBRARIES AND ZLIB_INCLUDE_DIRS)
/sw/lib
/usr/sfw/lib/64
/usr/sfw/lib
+ $ENV{PROGRAMFILES}/GnuWin32/lib
+ $ENV{PROGRAMFILES}/zlib/lib
)
set(ZLIB_INCLUDE_DIRS