mirror of https://github.com/CGAL/cgal
Ok for demo for aabbtree
This commit is contained in:
parent
66020d2386
commit
16a19eb33e
|
|
@ -13,17 +13,9 @@ endif()
|
|||
|
||||
# Include this package's headers first
|
||||
include_directories( BEFORE ./ ./include ../../include )
|
||||
# Find CGAL and CGAL Qt5
|
||||
|
||||
# TODO modifier le find_package(CGAL COMPONENTS Qt5) pour qu'il marche en header only
|
||||
if(ENABLE_HEADER_ONLY)
|
||||
find_package(CGAL)
|
||||
else()
|
||||
find_package(CGAL COMPONENTS Qt5)
|
||||
if(NOT CGAL_Qt5_FOUND)
|
||||
message(STATUS "NOTICE: This demo requires the CGAL Qt5 library and will not be compiled.")
|
||||
endif()
|
||||
endif()
|
||||
# Find CGAL and CGAL Qt5
|
||||
find_package(CGAL COMPONENTS Qt5)
|
||||
|
||||
include( ${CGAL_USE_FILE} )
|
||||
|
||||
|
|
@ -38,17 +30,11 @@ if(Qt5_FOUND)
|
|||
find_package(QGLViewer )
|
||||
endif(Qt5_FOUND)
|
||||
|
||||
if(CGAL_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
|
||||
if(CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
|
||||
|
||||
include_directories ( ${QGLVIEWER_INCLUDE_DIR} )
|
||||
|
||||
# TODO FAIRE UNE MACRO, ou mieux dans le find cgal avec module qt5 ?
|
||||
set(mocfiles "")
|
||||
set(RESOURCE_FILES "")
|
||||
foreach(qtmoc_file ${CGAL_QT5_QTMOCCMAKE_FILES})
|
||||
include(${qtmoc_file})
|
||||
endforeach()
|
||||
#end TODP
|
||||
cgal_include_moc_files()
|
||||
|
||||
qt5_wrap_ui( UI_FILES MainWindow.ui )
|
||||
|
||||
|
|
@ -83,7 +69,7 @@ if(CGAL_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
|
|||
add_to_cached_list( CGAL_EXECUTABLE_TARGETS AABB_demo )
|
||||
|
||||
|
||||
else (CGAL_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
|
||||
else (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
|
||||
|
||||
set(AABB_MISSING_DEPS "")
|
||||
|
||||
|
|
@ -91,6 +77,10 @@ else (CGAL_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
|
|||
set(AABB_MISSING_DEPS "the CGAL library, ${AABB_MISSING_DEPS}")
|
||||
endif()
|
||||
|
||||
if(NOT CGAL_Qt5_FOUND)
|
||||
message(AABB_MISSING_DEPS "CGAL_Qt5, ${AABB_MISSING_DEPS}")
|
||||
endif()
|
||||
|
||||
if(NOT Qt5_FOUND)
|
||||
set(AABB_MISSING_DEPS "Qt5, ${AABB_MISSING_DEPS}")
|
||||
endif()
|
||||
|
|
@ -101,8 +91,8 @@ else (CGAL_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
|
|||
|
||||
if(NOT QGLVIEWER_FOUND)
|
||||
set(AABB_MISSING_DEPS "QGLViewer, ${AABB_MISSING_DEPS}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "NOTICE: This demo requires ${AABB_MISSING_DEPS}and will not be compiled.")
|
||||
|
||||
endif (CGAL_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
|
||||
endif (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ macro(check_cgal_component COMPONENT)
|
|||
set( CHECK_CGAL_ERROR_TAIL "" )
|
||||
else()
|
||||
if ( WITH_${CGAL_LIB} )
|
||||
if(TARGET CGAL::${CGAL_LIB})
|
||||
if(TARGET CGAL::${CGAL_LIB} OR ENABLE_HEADER_ONLY)
|
||||
set( ${CGAL_LIB}_FOUND TRUE )
|
||||
else()
|
||||
set( ${CGAL_LIB}_FOUND FALSE )
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ macro(check_cgal_component COMPONENT)
|
|||
include(${CGAL_CONFIG_DIR}/${CGAL_LIB}LibConfig.cmake)
|
||||
endif()
|
||||
if ( WITH_${CGAL_LIB} )
|
||||
if(TARGET CGAL::${CGAL_LIB})
|
||||
if(TARGET CGAL::${CGAL_LIB} OR ENABLE_HEADER_ONLY )
|
||||
set( ${CGAL_LIB}_FOUND TRUE )
|
||||
else()
|
||||
set( ${CGAL_LIB}_FOUND FALSE )
|
||||
|
|
|
|||
|
|
@ -472,6 +472,15 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
|
|||
endif()
|
||||
endmacro()
|
||||
|
||||
macro ( cgal_include_moc_files )
|
||||
# set(mocfiles "")
|
||||
# set(RESOURCE_FILES "")
|
||||
if ( ENABLE_HEADER_ONLY )
|
||||
foreach(qtmoc_file ${CGAL_QT5_QTMOCCMAKE_FILES})
|
||||
include(${qtmoc_file})
|
||||
endforeach()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
## All the following macros are probably unused. -- Laurent Rineau, 2011/07/21
|
||||
|
||||
|
|
|
|||
|
|
@ -37,16 +37,18 @@ function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES)
|
|||
endif()
|
||||
|
||||
if (NOT ENABLE_HEADER_ONLY)
|
||||
add_library (${LIBRARY_NAME}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp
|
||||
${rc_file}
|
||||
${ADDITIONAL_FILES})
|
||||
if(CGAL_SOVERSION AND CGAL_SONAME_VERSION)
|
||||
set_target_properties(${LIBRARY_NAME} PROPERTIES
|
||||
VERSION "${CGAL_SOVERSION}"
|
||||
SOVERSION "${CGAL_SONAME_VERSION}")
|
||||
endif()
|
||||
endif()
|
||||
add_library (${LIBRARY_NAME}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp
|
||||
${rc_file}
|
||||
${ADDITIONAL_FILES})
|
||||
# add_library (${LIBRARY_NAME} ${CGAL_LIBRARY_SOURCE_FILES} ${rc_file} ${ADDITIONAL_FILES}) # builing not creating temporary all_files.cpp
|
||||
if(CGAL_SOVERSION AND CGAL_SONAME_VERSION)
|
||||
set_target_properties(${LIBRARY_NAME} PROPERTIES
|
||||
VERSION "${CGAL_SOVERSION}"
|
||||
SOVERSION "${CGAL_SONAME_VERSION}")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if(CGAL_AUTO_LINK_ENABLED)
|
||||
if (NOT ENABLE_HEADER_ONLY)
|
||||
|
|
@ -192,7 +194,9 @@ CGAL_add_if_target(CGAL_Core)
|
|||
CGAL_add_if_target(CGAL_ImageIO)
|
||||
CGAL_add_if_target(CGAL_Qt5)
|
||||
|
||||
export(TARGETS ${CGAL_ACTUAL_CONFIGURED_LIBRARIES} NAMESPACE CGAL:: FILE "${CMAKE_BINARY_DIR}/CGALExports.cmake")
|
||||
if (NOT ENABLE_HEADER_ONLY)
|
||||
export(TARGETS ${CGAL_ACTUAL_CONFIGURED_LIBRARIES} NAMESPACE CGAL:: FILE "${CMAKE_BINARY_DIR}/CGALExports.cmake")
|
||||
endif()
|
||||
|
||||
message(STATUS "Sources for CGAL component libraries '${CGAL_CONFIGURED_LIBRARIES}' detected")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue