aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cynapses.org>2010-12-31 14:08:20 +0100
committerAndreas Schneider <asn@cynapses.org>2010-12-31 14:10:59 +0100
commitbfe59d0cdd151f7f655c2a4066ba6e840b33fc82 (patch)
tree97dbfcf51b7252817583523f48bc47d45835af64
parent4362d764169b9c43508f97d20807ca48efe5fb8b (diff)
downloadlibssh-bfe59d0cdd151f7f655c2a4066ba6e840b33fc82.tar.gz
libssh-bfe59d0cdd151f7f655c2a4066ba6e840b33fc82.tar.xz
libssh-bfe59d0cdd151f7f655c2a4066ba6e840b33fc82.zip
cmake: Fixed installation path for OS/2.
-rw-r--r--CMakeLists.txt1
-rw-r--r--cmake/Modules/DefineInstallationPaths.cmake29
-rw-r--r--cmake/Modules/DefinePlatformDefaults.cmake25
3 files changed, 39 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 886c1c29..ff0feb5c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,6 +30,7 @@ set(CMAKE_MODULE_PATH
# add definitions
include(DefineCMakeDefaults)
include(DefineCompilerFlags)
+include(DefinePlatformDefaults)
include(DefineInstallationPaths)
include(DefineOptions.cmake)
include(CPackConfig.cmake)
diff --git a/cmake/Modules/DefineInstallationPaths.cmake b/cmake/Modules/DefineInstallationPaths.cmake
index 71e1e854..d857871e 100644
--- a/cmake/Modules/DefineInstallationPaths.cmake
+++ b/cmake/Modules/DefineInstallationPaths.cmake
@@ -1,4 +1,15 @@
-if (UNIX)
+if (WIN32)
+ # Same same
+ set(BIN_INSTALL_DIR "bin" CACHE PATH "-")
+ set(SBIN_INSTALL_DIR "." CACHE PATH "-")
+ set(LIB_INSTALL_DIR "lib" CACHE PATH "-")
+ set(INCLUDE_INSTALL_DIR "include" CACHE PATH "-")
+ set(PLUGIN_INSTALL_DIR "plugins" CACHE PATH "-")
+ set(HTML_INSTALL_DIR "doc/HTML" CACHE PATH "-")
+ set(ICON_INSTALL_DIR "." CACHE PATH "-")
+ set(SOUND_INSTALL_DIR "." CACHE PATH "-")
+ set(LOCALE_INSTALL_DIR "lang" CACHE PATH "-")
+elseif (UNIX OR OS2)
IF (NOT APPLICATION_NAME)
MESSAGE(STATUS "${PROJECT_NAME} is used as APPLICATION_NAME")
SET(APPLICATION_NAME ${PROJECT_NAME})
@@ -90,18 +101,4 @@ if (UNIX)
"${SHARE_INSTALL_PREFIX}/info"
CACHE PATH "The ${APPLICATION_NAME} info install dir (default prefix/info)"
)
-endif (UNIX)
-
-if (WIN32)
- # Same same
- set(BIN_INSTALL_DIR "bin" CACHE PATH "-")
- set(SBIN_INSTALL_DIR "." CACHE PATH "-")
- set(LIB_INSTALL_DIR "lib" CACHE PATH "-")
- set(INCLUDE_INSTALL_DIR "include" CACHE PATH "-")
- set(PLUGIN_INSTALL_DIR "plugins" CACHE PATH "-")
- set(HTML_INSTALL_DIR "doc/HTML" CACHE PATH "-")
- set(ICON_INSTALL_DIR "." CACHE PATH "-")
- set(SOUND_INSTALL_DIR "." CACHE PATH "-")
- set(LOCALE_INSTALL_DIR "lang" CACHE PATH "-")
-endif (WIN32)
-
+endif ()
diff --git a/cmake/Modules/DefinePlatformDefaults.cmake b/cmake/Modules/DefinePlatformDefaults.cmake
new file mode 100644
index 00000000..0c3a05eb
--- /dev/null
+++ b/cmake/Modules/DefinePlatformDefaults.cmake
@@ -0,0 +1,25 @@
+# Set system vars
+
+if (CMAKE_SYSTEM_NAME MATCHES "Linux")
+ set(LINUX TRUE)
+endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
+
+if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+ set(FREEBSD TRUE)
+endif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+
+if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+ set(OPENBSD TRUE)
+endif (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+
+if (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
+ set(NETBSD TRUE)
+endif (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
+
+if (CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)")
+ set(SOLARIS TRUE)
+endif (CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)")
+
+if (CMAKE_SYSTEM_NAME MATCHES "OS2")
+ set(OS2 TRUE)
+endif (CMAKE_SYSTEM_NAME MATCHES "OS2")