Skip to content

Commit cbe554c

Browse files
aminyaClausKlein
andcommitted
fix: enable CMP0177 for CMake >= 3.31
Add a version-guarded cmake_policy(SET CMP0177 NEW) to src/Index.cmake for CMake 3.31 and newer to normalize install directories. The policy is applied alongside existing policy settings to ensure consistent install directory behavior on newer CMake versions. Co-Authored-By: Claus Klein <1833050+ClausKlein@users.noreply.github.com>
1 parent 6c511c2 commit cbe554c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/Index.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ if(POLICY CMP0141)
1818
cmake_policy(SET CMP0141 NEW)
1919
endif()
2020

21+
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.31.0")
22+
# normalize install directories
23+
cmake_policy(SET CMP0177 NEW)
24+
endif()
25+
2126
# only useable here
2227
set(ProjectOptions_SRC_DIR "${CMAKE_CURRENT_LIST_DIR}")
2328

0 commit comments

Comments
 (0)