Skip to content

Commit

Permalink
CMake: Don't add uninstall target and CPack config if not top-level
Browse files Browse the repository at this point in the history
Fixes #2597
  • Loading branch information
ZedThree committed Oct 23, 2023
1 parent cb61d34 commit 523c648
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
# Set Project Properties
##################################

#Minimum required CMake Version
cmake_minimum_required(VERSION 3.12.0)
# CMake 3.12: Use libraries specified in CMAKE_REQUIRED_LIBRARIES for check include macros
cmake_minimum_required(VERSION 3.21.0)

#Project Name
project(netCDF
Expand Down Expand Up @@ -2789,5 +2787,6 @@ install(
####

# CPack inclusion must come last.
# INCLUDE(CPack)
INCLUDE(CMakeInstallation.cmake)
if (PROJECT_IS_TOP_LEVEL)
include(CMakeInstallation.cmake)
endif()

0 comments on commit 523c648

Please sign in to comment.