--- a/CMakeLists.txt Tue Jan 20 10:53:35 2009 -0800
+++ b/CMakeLists.txt Wed Jan 28 14:57:17 2009 -0800
@@ -16,35 +16,9 @@
find_path (dsrpdb_INCLUDE_DIR dsrpdb/Protein.h)
endif (use_dsrpdb)
-#CGAL
-execute_process (COMMAND ${CMAKE_MAKE_PROGRAM} -f ${CMAKE_CURRENT_SOURCE_DIR}/FindCGAL.Makefile libpaths
- OUTPUT_VARIABLE cgal_libpaths)
-execute_process (COMMAND ${CMAKE_MAKE_PROGRAM} -f ${CMAKE_CURRENT_SOURCE_DIR}/FindCGAL.Makefile ldflags
- OUTPUT_VARIABLE cgal_ldflags)
-execute_process (COMMAND ${CMAKE_MAKE_PROGRAM} -f ${CMAKE_CURRENT_SOURCE_DIR}/FindCGAL.Makefile cxxflags
- OUTPUT_VARIABLE cgal_cxxflags)
-execute_process (COMMAND ${CMAKE_MAKE_PROGRAM} -f ${CMAKE_CURRENT_SOURCE_DIR}/FindCGAL.Makefile libpath
- OUTPUT_VARIABLE cgal_libpath)
-#string (REPLACE "\n" "" cgal_libpaths ${cgal_libpaths})
-#string (REPLACE "\n" "" cgal_ldflags ${cgal_ldflags})
-string (REPLACE "\n" "" cgal_cxxflags ${cgal_cxxflags})
-string (REPLACE "\n" "" cgal_libpath ${cgal_libpath})
-find_library (cgal_LIBRARY NAMES CGAL
- PATHS ${cgal_libpath})
-find_library (core_LIBRARY NAMES CGALcore++
- PATHS ${cgal_libpath})
-find_library (mpfr_LIBRARY NAMES mpfr)
-find_library (gmp_LIBRARY NAMES gmp)
-find_library (gmpxx_LIBRARY NAMES gmpxx)
-find_library (m_LIBRARY NAMES m)
-
-set (cgal_libraries ${cgal_LIBRARY}
- ${core_LIBRARY}
- ${mpfr_LIBRARY}
- ${gmp_LIBRARY}
- ${gmpxx_LIBRARY}
- ${m_LIBRARY})
-add_definitions (-DCGAL_NO_ASSERTIONS -DCGAL_NO_PRECONDITIONS)
+# CGAL
+find_package (CGAL)
+#add_definitions (-DCGAL_NO_ASSERTIONS -DCGAL_NO_PRECONDITIONS)
# SYNAPS
if (use_synaps)
--- a/FindCGAL.Makefile Tue Jan 20 10:53:35 2009 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-include $(CGAL_MAKEFILE)
-
-all: libpath libpaths ldflags cxxflags
-
-libpath:
- @echo "$(CGAL_LIB_DIR)"
-
-libpaths:
- @echo "$(CGAL_LIBPATHFLAGS)"
-
-ldflags:
- @echo "$(CGAL_LDFLAGS)"
-
-cxxflags:
- @echo "$(CGAL_CXXFLAGS)"
--- a/README Tue Jan 20 10:53:35 2009 -0800
+++ b/README Wed Jan 28 14:57:17 2009 -0800
@@ -3,7 +3,7 @@
## Dependencies
- * [CGAL]-3.3 --- for alpha-shapes and kinetic data structures
+ * [CGAL]-3.4 --- for alpha-shapes and kinetic data structures
* [DSR-PDB] --- for reading in PDB files (if use_dsrpdb is turned on in cmake)
* [CMake] --- for controlling the build process
* [boost] --- great set of C++ libraries
--- a/examples/alphashapes/CMakeLists.txt Tue Jan 20 10:53:35 2009 -0800
+++ b/examples/alphashapes/CMakeLists.txt Wed Jan 28 14:57:17 2009 -0800
@@ -1,15 +1,24 @@
-set (targets
- alphashapes3d
- #alphashapes2d
- #alpharadius
- compare-diagrams)
-
-set (libraries ${libraries}
+set (libraries ${libraries}
${Boost_SERIALIZATION_LIBRARY}
${Boost_PROGRAM_OPTIONS_LIBRARY})
-add_definitions (${cgal_cxxflags})
-foreach (t ${targets})
- add_executable (${t} ${t}.cpp)
- target_link_libraries (${t} ${libraries} ${cgal_libraries})
-endforeach (t ${targets})
+# Build compare-diagrams
+add_executable (compare-diagrams compare-diagrams.cpp)
+target_link_libraries (compare-diagrams ${libraries})
+
+# Add targets that depend on CGAL
+if (CGAL_FOUND)
+ set (targets alphashapes3d
+ #alphashapes2d
+ #alpharadius
+ )
+ add_definitions (${CGAL_CXX_FLAGS_INIT})
+ include_directories (${CGAL_INCLUDE_DIRS})
+
+ foreach (t ${targets})
+ add_executable (${t} ${t}.cpp)
+ target_link_libraries (${t} ${libraries} ${CGAL_LIBRARY})
+ endforeach (t ${targets})
+else (CGAL_FOUND)
+ message(STATUS "CGAL not found, therefore alphashapes will not be built.")
+endif (CGAL_FOUND)
--- a/tests/utilities/CMakeLists.txt Tue Jan 20 10:53:35 2009 -0800
+++ b/tests/utilities/CMakeLists.txt Wed Jan 28 14:57:17 2009 -0800
@@ -1,8 +1,11 @@
set (targets
test-set-iterators
test-consistencylist
- test-orderlist
- test-counters)
+ test-orderlist)
+
+if (counters)
+ set (targets ${targets} test-counters)
+endif (counters)
foreach (t ${targets})
add_executable (${t} ${t}.cpp)