tudelft3d / pprepair

Validation and Automatic Repair of Planar Partitions
GNU General Public License v3.0
57 stars 22 forks source link

cmake 2.8.8 does not have FindCGAL.cmake #18

Closed bmmeijers closed 10 years ago

bmmeijers commented 10 years ago

cmake 2.8.8 (default on Redhat) does not include a FindCGAL.cmake module so then it does not work out of the box.

I added:

set(CGAL_DIR /home/martijn/opt/lib/CGAL)
find_package(CGAL REQUIRED)
include_directories(${CGAL_INCLUDE_DIRS})
set(LIBS ${LIBS} ${CGAL_LIBRARIES})

set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /home/martijn/opt/lib)
INCLUDE_DIRECTORIES(/home/martijn/opt/include)
LINK_DIRECTORIES(/home/martijn/opt/lib)

(as I installed CGAL in my home folder), it then works.

Maybe this can be done by forcing a specific version for cmake, that's what I don't know.

kenohori commented 10 years ago

Maybe it can be solved by upgrading to a more recent version of CMake?

bmmeijers commented 10 years ago

My point is more that the CMakeLists.txt of pprepair should warn/explain what to do if the CMake version is not 2.8.9...

Maybe put this at the top of the CMakeLists.txt:

cmake_minimum_required(VERSION 2.8.9)
kenohori commented 10 years ago

Confirmed: FindCGAL.make is part of CGAL, not of CMake, so nothing to be done here