CMake update

This commit is contained in:
Fernando Cacciola 2008-01-29 22:34:48 +00:00
parent c6c6ed7ef4
commit db23a5ade5
6 changed files with 43 additions and 97 deletions

4
.gitattributes vendored
View File

@ -1559,9 +1559,6 @@ CMake/cmake/modules/FindTAUCS.cmake -text
CMake/cmake/modules/FindZLIB.cmake -text
CMake/cmake/modules/GeneratorSpecificSettings.cmake -text
CMake/cmake/modules/LogCMakeVariables.cmake -text
CMake/cmake/modules/MacroCreateSingleSourceCGALProgram.cmake -text
CMake/cmake/modules/MacroCreateSingleSourceCGALQt4Program.cmake -text
CMake/cmake/modules/MacroCreateSingleSourceCGALQtProgram.cmake -text
CMake/cmake/modules/MacroFindOptionalCGALDependency.cmake -text
CMake/cmake/modules/MacroOptionalFindPackage.cmake -text
CMake/cmake/modules/OptionalAddSubdirectory.cmake -text
@ -3374,6 +3371,7 @@ Spatial_searching/doc_tex/Spatial_searching/Fig1.ps -text svneol=unset#applicati
Spatial_searching/doc_tex/Spatial_searching/windowQuery.png -text
Spatial_sorting/doc_tex/Spatial_sorting/fig/hilbert.png -text
Spatial_sorting/doc_tex/Spatial_sorting/fig/hilbertLarge.jpg -text
Straight_skeleton_2/demo/Straight_skeleton_2/CMakeLists.txt -text
Straight_skeleton_2/demo/Straight_skeleton_2/data/complex_0.poly -text svneol=unset#application/octet-stream
Straight_skeleton_2/demo/Straight_skeleton_2/data/complex_1.poly -text svneol=unset#application/octet-stream
Straight_skeleton_2/demo/Straight_skeleton_2/data/complex_2.poly -text svneol=unset#application/octet-stream

View File

@ -1,23 +0,0 @@
macro(create_single_source_cgal_program first )
set( all ${first} )
foreach( i ${ARGN} )
set( all ${all} ${i} )
endforeach()
get_filename_component(exe_name ${first} NAME_WE)
add_executable (${exe_name} ${all})
add_dependencies(${exe_name} CGAL CGAL_CORE)
# Link the executable to CGAL and third-party libraries
if ( NOT AUTO_LINK_ENABLED )
target_link_libraries(${exe_name} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
endif()
# Add " make test" rule for executable
# TODO: get test parameters from ${exe_name}.cmd
# add_test(${exe_name} ${exe_name})
endmacro()

View File

@ -1,29 +0,0 @@
macro(create_single_source_cgal_qt4_program first )
set( all ${first} )
foreach( i ${ARGN} )
set( all ${all} ${i} )
endforeach()
get_filename_component(exe_name ${first} NAME_WE)
QT4_AUTOMOC( ${all} )
# Make sure the compiler can find generated .moc files
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR})
add_executable (${exe_name} ${all})
add_dependencies(${exe_name} CGAL CGAL_CORE)
# Link the executable to CGAL and third-party libraries
if ( NOT AUTO_LINK_ENABLED )
target_link_libraries(${exe_name} ${CGAL_LIBRARIES} ${QT_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
endif()
# Add " make test" rule for executable
# TODO: get test parameters from ${exe_name}.cmd
# add_test(${exe_name} ${exe_name})
endmacro()

View File

@ -1,29 +0,0 @@
macro(create_single_source_cgal_qt_program first )
set( all ${first} )
foreach( i ${ARGN} )
set( all ${all} ${i} )
endforeach()
get_filename_component(exe_name ${first} NAME_WE)
QT3_AUTOMOC( ${all} )
# Make sure the compiler can find generated .moc files
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR})
add_executable (${exe_name} ${all})
add_dependencies(${exe_name} CGAL CGAL_QT CGAL_CORE)
# Link the executable to CGAL and third-party libraries
if ( NOT AUTO_LINK_ENABLED )
target_link_libraries(${exe_name} ${CGAL_LIBRARIES} ${CGAL_QT_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
endif()
# Add " make test" rule for executable
# TODO: get test parameters from ${exe_name}.cmd
# add_test(${exe_name} ${exe_name})
endmacro()

View File

@ -0,0 +1,22 @@
project (Straight_skeleton_2_Demo)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_BINARY_DIR}/cmake/modules" )
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules" )
find_package(CGAL)
if ( CGAL_FOUND )
include(UseCGAL)
include(CreateSingleSourceCGALQt3Program)
# Make sure the compiler can find local include files
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include")
include_directories (BEFORE include)
endif()
create_single_source_cgal_qt3_program( straight_skeleton_2.cpp straight_skeleton_2_toolbar.cpp straight_skeleton_2_toolbar_layers.cpp)
endif()

View File

@ -1,24 +1,31 @@
project (CGAL_STRAIGHT_SKELETON CXX)
project (Straight_skeleton_2_Example)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../../cmake/modules" )
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_BINARY_DIR}/cmake/modules" )
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules" )
find_package(CGAL)
include(UseCGAL)
if ( CGAL_FOUND )
set( sources "Straight_skeleton_2.cpp" )
# Make sure the compiler can find local include files
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include")
include_directories (BEFORE include)
include(UseCGAL)
include(CreateSingleSourceCGALProgram)
# Make sure the compiler can find local include files
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include")
include_directories (BEFORE include)
endif()
create_single_source_cgal_program( Create_offset_polygons_2.cpp )
create_single_source_cgal_program( Create_skeleton_and_offset_polygons_2.cpp )
create_single_source_cgal_program( Create_skeleton_and_offset_polygons_from_polygon_with_holes_2.cpp )
create_single_source_cgal_program( Create_skeleton_and_offset_polygons_with_holes_2.cpp )
create_single_source_cgal_program( Create_straight_skeleton_2.cpp )
create_single_source_cgal_program( Create_straight_skeleton_from_polygon_with_holes_2.cpp )
create_single_source_cgal_program( Low_level_API.cpp )
endif()
# This contains an utility macro to create an executable
# properly linked against CGAL for each .cpp in a list of files
include(MacroCreateSingleSourceCGALProgram)
create_single_source_cgal_program( ${sources} )