summaryrefslogtreecommitdiffstats
path: root/Source/CMakeLists.txt
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2022-08-21 04:21:52 (GMT)
committerBrad King <brad.king@kitware.com>2022-09-22 13:24:49 (GMT)
commit7df955315b6de04333c3c23a1601e3af4911ed32 (patch)
tree9a4b6d4ec2d90e053756fea3b1a5c3120f08064c /Source/CMakeLists.txt
parent626136ad4dbf13f560d8c55c5d50f0488e8db966 (diff)
downloadCMake-7df955315b6de04333c3c23a1601e3af4911ed32.zip
CMake-7df955315b6de04333c3c23a1601e3af4911ed32.tar.gz
CMake-7df955315b6de04333c3c23a1601e3af4911ed32.tar.bz2
Build: Add `ENABLE_BUILD_FREEBSD_PKG` to `cmCPackConfigure.h`
Diffstat (limited to 'Source/CMakeLists.txt')
-rw-r--r--Source/CMakeLists.txt10
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 2cf4d1c..ec581e8 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -1049,7 +1049,6 @@ target_include_directories(
target_link_libraries(CPackLib PUBLIC CMakeLib)
option(CPACK_ENABLE_FREEBSD_PKG "Add FreeBSD pkg(8) generator to CPack." OFF)
-
if(UNIX)
target_sources(
CPackLib
@@ -1070,7 +1069,10 @@ if(UNIX)
pkg
DOC "FreeBSD pkg(8) library")
if(FREEBSD_PKG_LIBRARIES)
+ set(ENABLE_BUILD_FREEBSD_PKG 1)
target_sources(CPackLib PUBLIC CPack/cmCPackFreeBSDGenerator.cxx)
+ target_include_directories(CPackLib PUBLIC ${FREEBSD_PKG_INCLUDE_DIRS})
+ target_link_libraries(CPackLib PUBLIC ${FREEBSD_PKG_LIBRARIES})
endif()
endif()
@@ -1151,11 +1153,7 @@ if(APPLE)
"See CMakeFiles/CMakeError.log for details of the failure.")
endif()
endif()
-if(CPACK_ENABLE_FREEBSD_PKG AND FREEBSD_PKG_INCLUDE_DIRS AND FREEBSD_PKG_LIBRARIES)
- target_include_directories(CPackLib PUBLIC ${FREEBSD_PKG_INCLUDE_DIRS})
- target_link_libraries(CPackLib PUBLIC ${FREEBSD_PKG_LIBRARIES})
- target_compile_definitions(CPackLib PUBLIC HAVE_FREEBSD_PKG)
-endif()
+
# Render config header file for CPackLib
configure_file(CPack/cmCPackConfigure.h.in CPack/cmCPackConfigure.h)