diff options
author | Christian Pfeiffer <cpfeiffer@live.de> | 2017-11-20 15:29:25 (GMT) |
---|---|---|
committer | Christian Pfeiffer <cpfeiffer@live.de> | 2017-11-20 15:29:25 (GMT) |
commit | a62d50ec56087bc6364c2e6c097b312167839957 (patch) | |
tree | ccd039133f878c223a4debd63e5b369ab87dc214 /Modules/FindTCL.cmake | |
parent | fd56d6a8e637750cbf2e038bde12164962c66bc4 (diff) | |
download | CMake-a62d50ec56087bc6364c2e6c097b312167839957.zip CMake-a62d50ec56087bc6364c2e6c097b312167839957.tar.gz CMake-a62d50ec56087bc6364c2e6c097b312167839957.tar.bz2 |
Modules: Replace coded PATHS with PATH_SUFFIXES
Some modules assume that `/usr` and `/usr/local` are the only
`CMAKE_PREFIX_PATH` entries and explicitly enumerate all paths instead
of using `PATH_SUFFIXES` and relying on the dynamic set of prefix paths.
This commit attempts to rectify that behavior.
Diffstat (limited to 'Modules/FindTCL.cmake')
-rw-r--r-- | Modules/FindTCL.cmake | 47 |
1 files changed, 28 insertions, 19 deletions
diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake index a711493..80779b3 100644 --- a/Modules/FindTCL.cmake +++ b/Modules/FindTCL.cmake @@ -82,11 +82,16 @@ set(TCLTK_POSSIBLE_LIB_PATHS "${TK_LIBRARY_PATH}" "${TCL_TCLSH_PATH_PARENT}/lib" "${TK_WISH_PATH_PARENT}/lib" - /usr/local/lib/tcl/tcl8.5 - /usr/local/lib/tcl/tk8.5 - /usr/local/lib/tcl/tcl8.4 - /usr/local/lib/tcl/tk8.4 - ) +) + +set(TCLTK_POSSIBLE_LIB_PATH_SUFFIXES + lib/tcl/tcl8.6 + lib/tcl/tk8.6 + lib/tcl/tcl8.5 + lib/tcl/tk8.5 + lib/tcl/tcl8.4 + lib/tcl/tk8.4 +) if(WIN32) get_filename_component( @@ -118,6 +123,7 @@ find_library(TCL_LIBRARY tcl82 tcl8.2 tcl80 tcl8.0 PATHS ${TCLTK_POSSIBLE_LIB_PATHS} + PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES} ) find_library(TK_LIBRARY @@ -131,6 +137,7 @@ find_library(TK_LIBRARY tk82 tk8.2 tk80 tk8.0 PATHS ${TCLTK_POSSIBLE_LIB_PATHS} + PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES} ) CMAKE_FIND_FRAMEWORKS(Tcl) @@ -164,20 +171,20 @@ set(TCLTK_POSSIBLE_INCLUDE_PATHS ${TK_FRAMEWORK_INCLUDES} "${TCL_TCLSH_PATH_PARENT}/include" "${TK_WISH_PATH_PARENT}/include" - /usr/include/tcl${TK_LIBRARY_VERSION} - /usr/include/tcl${TCL_LIBRARY_VERSION} - /usr/include/tcl8.6 - /usr/include/tcl8.5 - /usr/include/tcl8.4 - /usr/include/tcl8.3 - /usr/include/tcl8.2 - /usr/include/tcl8.0 - /usr/local/include/tcl8.6 - /usr/local/include/tk8.6 - /usr/local/include/tcl8.5 - /usr/local/include/tk8.5 - /usr/local/include/tcl8.4 - /usr/local/include/tk8.4 + ) + +set(TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES + include/tcl${TK_LIBRARY_VERSION} + include/tcl${TCL_LIBRARY_VERSION} + include/tcl8.6 + include/tk8.6 + include/tcl8.5 + include/tk8.5 + include/tcl8.4 + include/tk8.4 + include/tcl8.3 + include/tcl8.2 + include/tcl8.0 ) if(WIN32) @@ -198,11 +205,13 @@ endif() find_path(TCL_INCLUDE_PATH NAMES tcl.h HINTS ${TCLTK_POSSIBLE_INCLUDE_PATHS} + PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES} ) find_path(TK_INCLUDE_PATH NAMES tk.h HINTS ${TCLTK_POSSIBLE_INCLUDE_PATHS} + PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES} ) include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) |