Commit 21336bb1 authored by Jan Möbius's avatar Jan Möbius
Browse files

Merge branch 'fix-issue-176-uic' into 'master'

Fix issue OpenFlipper-Free#176, Qt UIC include directories.

Closes OpenFlipper-Free#176

See merge request !190
parents f0e55a67 4bb5749c
......@@ -48,15 +48,16 @@ acg_add_library ( ${TYPENAME} SHARED ${sources} ${headers})
set_target_properties ( ${TYPENAME} PROPERTIES MACOSX_RPATH 0 )
if ( NOT WIN32 )
# Allow targets depending on ACG find the autogenerated header files
# Allow targets depending on the current type find the autogenerated header files from uic
# cf OpenFlipper/libs_required/ACG/CMakeLists.txt
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if ( _isMultiConfig )
target_include_directories( ${TYPENAME} PUBLIC
${CMAKE_CURRENT_BINARY_DIR}/${TYPENAME}_autogen/include )
${CMAKE_CURRENT_BINARY_DIR}/${TYPENAME}_autogen/include_$<CONFIG>/)
else()
# Allow targets depending on the current type find the autogenerated header files from uic
target_include_directories( ${TYPENAME} PUBLIC
$<$<CONFIG:Debug>:${CMAKE_CURRENT_BINARY_DIR}/${TYPENAME}_autogen/include_Debug/>
$<$<CONFIG:Release>:${CMAKE_CURRENT_BINARY_DIR}/${TYPENAME}_autogen/include_Release/> )
${CMAKE_CURRENT_BINARY_DIR}/${TYPENAME}_autogen/include )
endif()
......
......@@ -112,17 +112,24 @@ endif ()
# display results
acg_print_configure_header (ACG "ACG")
if ( NOT WIN32 )
# Allow targets depending on ACG find the autogenerated header files
# Allow targets depending on ACG find the autogenerated header files
# cf OpenFlipper/cmake/type.cmake
# cf https://www.graphics.rwth-aachen.de:9000/OpenFlipper-Free/OpenFlipper-Free/-/issues/176
# CMake's AUTOUIC automatically adds the proper include path to the target, however
# we need a PUBLIC include directory - so we do this manually for now:
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if ( _isMultiConfig )
target_include_directories( ACG PUBLIC
${CMAKE_CURRENT_BINARY_DIR}/ACG_autogen/include )
${CMAKE_CURRENT_BINARY_DIR}/ACG_autogen/include_$<CONFIG>/)
else()
# Allow targets depending on ACG find the autogenerated header files
target_include_directories( ACG PUBLIC
$<$<CONFIG:Debug>:${CMAKE_CURRENT_BINARY_DIR}/ACG_autogen/include_Debug/>
$<$<CONFIG:Release>:${CMAKE_CURRENT_BINARY_DIR}/ACG_autogen/include_Release/> )
${CMAKE_CURRENT_BINARY_DIR}/ACG_autogen/include )
endif()
target_link_libraries ( ACG ${OPENMESH_LIBRARIES}
${QT_LIBRARIES}
${OPENGL_LIBRARIES}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment