Sfoglia il codice sorgente

Merge topic 'move-platform-specific-paths'

0b668e52 Cygwin: Move Cygwin-specific paths to the cygwin platform
2a8c2af4 SunOS: Move solaris-specific paths to the solaris platform
7eb1f5b7 Unix: Consolidate path components into prefixes

Acked-by: Kitware Robot <[email protected]>
Merge-request: !589
Brad King 8 anni fa
parent
commit
09f85c98c0

+ 10 - 0
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
+  )

+ 5 - 0
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)

+ 9 - 22
Modules/Platform/UnixPaths.cmake

@@ -41,35 +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
+  )
+
 # 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
-  # Windows API on Cygwin
-  /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