james94 commented on code in PR #1793:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1793#discussion_r1712441351
##########
CMakeLists.txt:
##########
@@ -593,9 +596,11 @@ set(CPACK_PACKAGE_VENDOR "Apache NiFi")
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
-set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/LICENSE"
"${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt" COPYONLY)
-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt")
+if(NOT MINIFI_BUILD_CONAN_PACKAGE)
+ set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/LICENSE"
"${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt" COPYONLY)
+ set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt")
+endif()
Review Comment:
When we create the **MiNiFi C++ conan package**, **LICENSE** and **NOTICE**
are in the conan package. In the **conanfile.py**, we tell conan to include all
the files assigned to **shared_sources** variable to be included in the conan
package. In our conanfile.py's **package()** method, we also run
**cmake.install()**, so in MiNiFi C++'s CMakeLists.txt files all CMake commands
using **install(...)** will also copy over those sources (.h*, .i*, etc) and
compiled binary assets (static libs, shared libs, minifi binary, etc) into our
MiNiFi C++ conan package.
In the past when I tried maintaining that CPACK part way of doing it, when I
ran **conan create**, it complained about those 3 lines. However, today with
**conan 2.0.17** I removed that MINIFI_BUILD_CONAN_PACKAGE check and was able
to successfully run **conan create** with those 3 lines enabled. I will push
the update commit up to the repo now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]