summaryrefslogtreecommitdiff
path: root/src/Witness_complex/example/CMakeLists.txt
diff options
context:
space:
mode:
authorskachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-04-27 10:24:05 +0000
committerskachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-04-27 10:24:05 +0000
commiteaedaf52122a397f35fb75df93f83ae9ffdceb7c (patch)
treed54ae253915affc0604583b6bf7176f45c5ed314 /src/Witness_complex/example/CMakeLists.txt
parentd3cef9245dcff1ea585142ef0b711bb35b6f9338 (diff)
Struggled with CMake...
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/witness@579 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 38b558196806b226cba5e1ef30abb927619bbe33
Diffstat (limited to 'src/Witness_complex/example/CMakeLists.txt')
-rw-r--r--src/Witness_complex/example/CMakeLists.txt48
1 files changed, 33 insertions, 15 deletions
diff --git a/src/Witness_complex/example/CMakeLists.txt b/src/Witness_complex/example/CMakeLists.txt
index 51f7976b..14d23551 100644
--- a/src/Witness_complex/example/CMakeLists.txt
+++ b/src/Witness_complex/example/CMakeLists.txt
@@ -1,23 +1,41 @@
cmake_minimum_required(VERSION 2.6)
project(GUDHIWitnessComplex)
+#cmake -DCGAL_DIR=~/GitDrive/CGAL/ ../../..
-add_executable ( simple_witness_complex simple_witness_complex.cpp )
-add_test(simple_witness_complex ${CMAKE_CURRENT_BINARY_DIR}/simple_witness_complex)
+#if (CGAL_FOUND)
+ #message(STATUS "CGAL version: ${CGAL_VERSION}.")
+ #include( ${CGAL_USE_FILE} )
-add_executable( witness_complex_from_file witness_complex_from_file.cpp )
-add_test( witness_complex_from_bunny &{CMAKE_CURRENT_BINARY_DIR}/witness_complex_from_file ${CMAKE_SOURCE_DIR}/data/points/bunny_5000 )
+ #find_package(Eigen3 3.1.0)
+ #include( ${EIGEN3_USE_FILE} )
-add_executable( witness_complex_from_off witness_complex_from_off.cpp )
+ #INCLUDE_DIRECTORIES(${EIGEN3_INCLUDE_DIR})
+ #INCLUDE_DIRECTORIES(${CGAL_INCLUDE_DIRS})
+ add_executable ( simple_witness_complex simple_witness_complex.cpp )
+ add_test(simple_witness_complex ${CMAKE_CURRENT_BINARY_DIR}/simple_witness_complex)
-add_executable( witness_complex_from_wl_matrix witness_complex_from_wl_matrix.cpp )
+ #add_executable( witness_complex_from_file witness_complex_from_file.cpp )
+ #target_link_libraries(witness_complex_from_file ${EIGEN3_LIBRARIES} ${CGAL_LIBRARY})
+ #add_test( witness_complex_from_bunny &{CMAKE_CURRENT_BINARY_DIR}/witness_complex_from_file ${CMAKE_SOURCE_DIR}/data/points/bunny_5000 100)
+
+ add_executable( witness_complex_from_off witness_complex_from_off.cpp )
+
+ add_executable( witness_complex_from_wl_matrix witness_complex_from_wl_matrix.cpp )
+#endif()
# An example with Simplex-tree using CGAL alpha_shapes_3
-#if(GMP_FOUND AND CGAL_FOUND)
-# message("CGAL_lib = ${CGAL_LIBRARIES_DIR}")
-# message("GMP_LIBRARIES = ${GMP_LIBRARIES}")
-# INCLUDE_DIRECTORIES(${GMP_INCLUDE_DIR})
-# INCLUDE_DIRECTORIES(${CGAL_INCLUDE_DIRS})
-# add_executable ( simplex_tree_from_alpha_shapes_3 simplex_tree_from_alpha_shapes_3.cpp )
-# target_link_libraries(simplex_tree_from_alpha_shapes_3 ${GMP_LIBRARIES} ${CGAL_LIBRARY})
-# add_test(simplex_tree_from_alpha_shapes_3 ${CMAKE_CURRENT_BINARY_DIR}/simplex_tree_from_alpha_shapes_3 ${CMAKE_SOURCE_DIR}/data/points/bunny_5000)
-#endif()
+
+include( ${CGAL_USE_FILE} )
+find_package(Eigen3 3.1.0)
+if(GMP_FOUND AND CGAL_FOUND)
+ message("CGAL_lib = ${CGAL_LIBRARIES_DIR}")
+ message("GMP_LIBRARIES = ${GMP_LIBRARIES}")
+ message(STATUS "Eigen3 version: ${EIGEN3_VERSION}.")
+ #message("EIGEN3_LIBRARIES = ${EIGEN3_LIBRARIES}")
+ INCLUDE_DIRECTORIES(${EIGEN3_INCLUDE_DIRS})
+ INCLUDE_DIRECTORIES(${GMP_INCLUDE_DIR})
+ INCLUDE_DIRECTORIES(${CGAL_INCLUDE_DIRS})
+ add_executable (witness_complex_from_file witness_complex_from_file.cpp )
+ target_link_libraries(witness_complex_from_file ${GMP_LIBRARIES} ${EIGEN3_LIBRARIES} ${CGAL_LIBRARY})
+ add_test(witness_complex_from_file ${CMAKE_CURRENT_BINARY_DIR}/witness_complex_from_file ${CMAKE_SOURCE_DIR}/data/points/bunny_5000 100)
+endif()