mirror of https://github.com/CGAL/cgal
Merge branch 'Installation-CreateSingleSourceCGALProgram_warning-lrineau'
This commit is contained in:
commit
aa3d26e96c
|
|
@ -4,6 +4,8 @@ function(create_single_source_cgal_program firstfile )
|
||||||
set(firstfile "${CMAKE_CURRENT_SOURCE_DIR}/${firstfile}")
|
set(firstfile "${CMAKE_CURRENT_SOURCE_DIR}/${firstfile}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
get_filename_component(exe_name ${firstfile} NAME_WE)
|
||||||
|
|
||||||
if(EXISTS "${firstfile}")
|
if(EXISTS "${firstfile}")
|
||||||
|
|
||||||
set( all "${firstfile}" )
|
set( all "${firstfile}" )
|
||||||
|
|
@ -14,7 +16,6 @@ function(create_single_source_cgal_program firstfile )
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
|
||||||
get_filename_component(exe_name ${firstfile} NAME_WE)
|
|
||||||
add_executable(${exe_name} ${all})
|
add_executable(${exe_name} ${all})
|
||||||
|
|
||||||
add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${exe_name} )
|
add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${exe_name} )
|
||||||
|
|
@ -29,7 +30,8 @@ function(create_single_source_cgal_program firstfile )
|
||||||
target_link_libraries(${exe_name} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
|
target_link_libraries(${exe_name} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
else()
|
||||||
|
message(AUTHOR_WARNING "The executable ${exe_name} will not be created because the source file ${firstfile} does not exist.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue