mirror of https://github.com/CGAL/cgal
Merge pull request #5162 from maxGimeno/CMake-Add_prefix_path-maxGimeno
CMake: Make it easier to find boost and qt on windows
This commit is contained in:
commit
fd137d227e
|
|
@ -57,6 +57,36 @@ if(BUILD_TESTING)
|
|||
enable_testing()
|
||||
endif()
|
||||
|
||||
#setup prefix path
|
||||
file(GLOB BOOST_DIRS "C:/Program Files/boost/*")
|
||||
if(NOT BOOST_DIRS)
|
||||
file(GLOB BOOST_DIRS "C:/Program Files/boost*")
|
||||
endif()
|
||||
if(NOT BOOST_DIRS)
|
||||
file(GLOB BOOST_DIRS "C:/Program Files (x86)/boost/*")
|
||||
endif()
|
||||
if(NOT BOOST_DIRS)
|
||||
file(GLOB BOOST_DIRS "C:/Program Files (x86)/boost*")
|
||||
endif()
|
||||
if(NOT BOOST_DIRS)
|
||||
file(GLOB BOOST_DIRS "C:/local/boost*")
|
||||
endif()
|
||||
if(BOOST_DIRS)
|
||||
list(GET BOOST_DIRS 0 boost_dir)
|
||||
list(APPEND CMAKE_PREFIX_PATH "${boost_dir}")
|
||||
endif()#BOOST_DIRS
|
||||
|
||||
file(GLOB QT_DIRS "C:/Qt/5")
|
||||
if(QT_DIRS)
|
||||
list(GET QT_DIRS 0 qt_dir)
|
||||
file(GLOB COMPS "${qt_dir}/msvc*")
|
||||
if(COMPS)
|
||||
list(GET COMPS 0 COMP)
|
||||
list(APPEND CMAKE_PREFIX_PATH "${COMP}")
|
||||
endif()#COMPS
|
||||
endif()#QT_DIRS
|
||||
|
||||
|
||||
# and finally start actual build
|
||||
add_subdirectory(Installation)
|
||||
add_subdirectory(Documentation/doc)
|
||||
|
|
|
|||
Loading…
Reference in New Issue