Skip to content

Commit

Permalink
[QT] Enable the 'NEW' mode of CMP0100 (openMVG#1760)
Browse files Browse the repository at this point in the history
Without this, new versions of cmake do not run automoc on .hh files,
generating linker errors for the ui tools.
  • Loading branch information
cwgthornton authored Jun 24, 2020
1 parent 6eedd0b commit cf5a575
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.1)

project(openMVG C CXX)

# Run automoc on .hh files in new versions of cmake
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.17")
cmake_policy(SET CMP0100 NEW)
endif()

# guard against in-source builds
if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message(FATAL_ERROR "In-source builds not allowed.")
Expand Down

0 comments on commit cf5a575

Please sign in to comment.