summaryrefslogtreecommitdiffstats
path: root/Modules/FindFLTK2.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-11-27 13:52:59 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-11-27 13:53:04 (GMT)
commitb67762ff3c4e24be75090cb2dca6c2b0e7f08dcb (patch)
tree4b278448b1b12d0b2bb439cfa5d2d790f52acc41 /Modules/FindFLTK2.cmake
parent784e429d1fa4635bad640d69b8207bfcb1750eb7 (diff)
parenta62d50ec56087bc6364c2e6c097b312167839957 (diff)
downloadCMake-b67762ff3c4e24be75090cb2dca6c2b0e7f08dcb.zip
CMake-b67762ff3c4e24be75090cb2dca6c2b0e7f08dcb.tar.gz
CMake-b67762ff3c4e24be75090cb2dca6c2b0e7f08dcb.tar.bz2
Merge topic 'hardcoded-path-removal'
a62d50ec Modules: Replace coded PATHS with PATH_SUFFIXES fd56d6a8 FindMPEG,2: Update to current libmpeg2 behavior 5f382cd8 FindPike: Update names and paths 6720807d FindAVIFile: Replace PATHS with updated suffixes f88ef9a9 Modules: Remove paths set as global Unix prefixes Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1502
Diffstat (limited to 'Modules/FindFLTK2.cmake')
-rw-r--r--Modules/FindFLTK2.cmake29
1 files changed, 10 insertions, 19 deletions
diff --git a/Modules/FindFLTK2.cmake b/Modules/FindFLTK2.cmake
index a43e5ff..365a82a 100644
--- a/Modules/FindFLTK2.cmake
+++ b/Modules/FindFLTK2.cmake
@@ -80,11 +80,11 @@ if(NOT FLTK2_DIR)
# Look in places relative to the system executable search path.
${FLTK2_DIR_SEARCH}
- # Look in standard UNIX install locations.
- /usr/local/lib/fltk2
- /usr/lib/fltk2
- /usr/local/fltk2
- /usr/X11R6/include
+ PATH_SUFFIXES
+ fltk2
+ fltk2/include
+ lib/fltk2
+ lib/fltk2/include
# Help the user find it if we cannot.
DOC "The ${FLTK2_DIR_STRING}"
@@ -175,25 +175,16 @@ if(FLTK2_DIR)
set(FLTK2_WRAP_UI 1)
endif()
- set(FLTK2_INCLUDE_SEARCH_PATH ${FLTK2_INCLUDE_SEARCH_PATH}
- /usr/local/fltk2
- /usr/X11R6/include
- )
-
- find_path(FLTK2_INCLUDE_DIR fltk/run.h ${FLTK2_INCLUDE_SEARCH_PATH})
+ find_path(FLTK2_INCLUDE_DIR fltk/run.h ${FLTK2_INCLUDE_SEARCH_PATH} PATH_SUFFIXES fltk2 fltk2/include)
- set(FLTK2_LIBRARY_SEARCH_PATH ${FLTK2_LIBRARY_SEARCH_PATH}
- /usr/local/fltk2/lib
- /usr/X11R6/lib
- ${FLTK2_INCLUDE_DIR}/lib
- )
+ list(APPEND FLTK2_LIBRARY_SEARCH_PATH ${FLTK2_INCLUDE_DIR}/lib)
find_library(FLTK2_BASE_LIBRARY NAMES fltk2
- PATHS ${FLTK2_LIBRARY_SEARCH_PATH})
+ PATHS ${FLTK2_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk2 fltk2/lib)
find_library(FLTK2_GL_LIBRARY NAMES fltk2_gl
- PATHS ${FLTK2_LIBRARY_SEARCH_PATH})
+ PATHS ${FLTK2_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk2 fltk2/lib)
find_library(FLTK2_IMAGES_LIBRARY NAMES fltk2_images
- PATHS ${FLTK2_LIBRARY_SEARCH_PATH})
+ PATHS ${FLTK2_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk2 fltk2/lib)
# Find the extra libraries needed for the fltk_images library.
if(UNIX)