From 7eb1f5b7aca1500e68a8be7ba158ed616a8595df Mon Sep 17 00:00:00 2001 From: Chuck Atkins Date: Thu, 16 Mar 2017 05:57:58 -0400 Subject: Unix: Consolidate path components into prefixes --- Modules/Platform/UnixPaths.cmake | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake index b216d03..11b28f8 100644 --- a/Modules/Platform/UnixPaths.cmake +++ b/Modules/Platform/UnixPaths.cmake @@ -41,18 +41,22 @@ if (NOT CMAKE_FIND_NO_INSTALL_PREFIX) endif() endif() +# Non "standard" but common install prefixes +list(APPEND CMAKE_SYSTEM_PREFIX_PATH + /usr/X11R6 + /usr/pkg + /opt/csw + /opt + /opt/openwin + ) + # List common include file locations not under the common prefixes. list(APPEND CMAKE_SYSTEM_INCLUDE_PATH # Windows API on Cygwin /usr/include/w32api # X11 - /usr/X11R6/include /usr/include/X11 - - # Other - /usr/pkg/include - /opt/csw/include /opt/include - /usr/openwin/include + /usr/include/X11 ) list(APPEND CMAKE_SYSTEM_LIBRARY_PATH @@ -60,16 +64,7 @@ list(APPEND CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/w32api # X11 - /usr/X11R6/lib /usr/lib/X11 - - # Other - /usr/pkg/lib - /opt/csw/lib /opt/lib - /usr/openwin/lib - ) - -list(APPEND CMAKE_SYSTEM_PROGRAM_PATH - /usr/pkg/bin + /usr/lib/X11 ) list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES -- cgit v0.12 From 2a8c2af4d4ca1ec653c87c11a3f79a241b6b27e7 Mon Sep 17 00:00:00 2001 From: Chuck Atkins Date: Thu, 16 Mar 2017 06:00:19 -0400 Subject: SunOS: Move solaris-specific paths to the solaris platform --- Modules/Platform/SunOS.cmake | 5 +++++ Modules/Platform/UnixPaths.cmake | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Modules/Platform/SunOS.cmake b/Modules/Platform/SunOS.cmake index 58398c0..e19e89a 100644 --- a/Modules/Platform/SunOS.cmake +++ b/Modules/Platform/SunOS.cmake @@ -9,6 +9,11 @@ endif() include(Platform/UnixPaths) +list(APPEND CMAKE_SYSTEM_PREFIX_PATH + /opt/csw + /opt/openwin + ) + # The Sun linker needs to find transitive shared library dependencies # in the -L path. set(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1) diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake index 11b28f8..48bbd40 100644 --- a/Modules/Platform/UnixPaths.cmake +++ b/Modules/Platform/UnixPaths.cmake @@ -45,9 +45,7 @@ endif() list(APPEND CMAKE_SYSTEM_PREFIX_PATH /usr/X11R6 /usr/pkg - /opt/csw /opt - /opt/openwin ) # List common include file locations not under the common prefixes. -- cgit v0.12 From 0b668e52a91b7f03f312c691e5b1c54a371d0316 Mon Sep 17 00:00:00 2001 From: Chuck Atkins Date: Thu, 16 Mar 2017 06:04:29 -0400 Subject: Cygwin: Move Cygwin-specific paths to the cygwin platform --- Modules/Platform/CYGWIN.cmake | 10 ++++++++++ Modules/Platform/UnixPaths.cmake | 6 ------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Modules/Platform/CYGWIN.cmake b/Modules/Platform/CYGWIN.cmake index 22816e7..9b897bd 100644 --- a/Modules/Platform/CYGWIN.cmake +++ b/Modules/Platform/CYGWIN.cmake @@ -62,3 +62,13 @@ set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a") set(CMAKE_SHARED_LIBRARY_NAME_WITH_VERSION 1) include(Platform/UnixPaths) + +# Windows API on Cygwin +list(APPEND CMAKE_SYSTEM_INCLUDE_PATH + /usr/include/w32api + ) + +# Windows API on Cygwin +list(APPEND CMAKE_SYSTEM_LIBRARY_PATH + /usr/lib/w32api + ) diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake index 48bbd40..89f7d87 100644 --- a/Modules/Platform/UnixPaths.cmake +++ b/Modules/Platform/UnixPaths.cmake @@ -50,17 +50,11 @@ list(APPEND CMAKE_SYSTEM_PREFIX_PATH # List common include file locations not under the common prefixes. list(APPEND CMAKE_SYSTEM_INCLUDE_PATH - # Windows API on Cygwin - /usr/include/w32api - # X11 /usr/include/X11 ) list(APPEND CMAKE_SYSTEM_LIBRARY_PATH - # Windows API on Cygwin - /usr/lib/w32api - # X11 /usr/lib/X11 ) -- cgit v0.12