Skip to content

Commit

Permalink
Handle ports without license
Browse files Browse the repository at this point in the history
See #10
  • Loading branch information
traversaro authored Sep 12, 2019
1 parent 79c6362 commit 309567d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,12 @@ foreach(triplet ${VCPKG_CPACK_TARGET_TRIPLETS})
install(DIRECTORY ${dirs}
DESTINATION ${triplet}
COMPONENT ${component}_${triplet_comp})
configure_file("${PACKAGES_DIR}/${port}_${triplet}/share/${port}/copyright"
if(EXISTS "${PACKAGES_DIR}/${port}_${triplet}/share/${port}/copyright")
set(port_license_file "${PACKAGES_DIR}/${port}_${triplet}/share/${port}/copyright")
else()
set(port_license_file "${VCPKG_ROOT_DIR}/LICENSE.txt")
endif()
configure_file("${port_license_file}"
"${CMAKE_BINARY_DIR}/Licenses/${port}-${triplet}"
COPYONLY)

Expand Down

0 comments on commit 309567d

Please sign in to comment.