Move add_definition before collect cgal library (bugfix)

This commit is contained in:
Guillaume Damiand 2016-06-28 12:46:22 +02:00
parent 4165a5a312
commit 71d9047b87
2 changed files with 6 additions and 7 deletions

View File

@ -24,6 +24,7 @@ if (CGAL_HEADER_ONLY)
else()
include_directories( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS} .)
link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
add_definitions ( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_ImageIO_3RD_PARTY_DEFINITIONS} )
endif()
collect_cgal_library( CGAL_ImageIO "")
@ -32,8 +33,6 @@ if (NOT CGAL_HEADER_ONLY)
add_dependencies( CGAL_ImageIO CGAL )
add_definitions( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_ImageIO_3RD_PARTY_DEFINITIONS} )
# CGAL_ImageIO only depends on CGAL in DEBUG, but we still link it
# in both build types.
target_link_libraries( CGAL_ImageIO CGAL ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_ImageIO_3RD_PARTY_LIBRARIES} )

View File

@ -79,6 +79,8 @@ else(CGAL_HEADER_ONLY)
include_directories( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS} )
link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
add_definitions ( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_Qt5_3RD_PARTY_DEFINITIONS} )
endif(CGAL_HEADER_ONLY)
collect_cgal_library( CGAL_Qt5 "${additional_files}")
@ -93,8 +95,6 @@ if (NOT CGAL_HEADER_ONLY)
# both build types.
target_link_libraries( CGAL_Qt5 CGAL ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_Qt5_3RD_PARTY_LIBRARIES} )
add_definitions ( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_Qt5_3RD_PARTY_DEFINITIONS} )
else()
install(DIRECTORY "../../include/CGAL/Qt/" DESTINATION "${CGAL_INSTALL_INC_DIR}/CGAL/include/CGAL/Qt")