@@ -383,7 +383,7 @@ if(DEFINED SKBUILD_METADATA_DIR)
383
383
set (PYLON_LICENSE_DIR "$ENV{PYLON_ROOT} /Licenses" )
384
384
endif ()
385
385
elseif (APPLE )
386
- set (PYLON_LICENSE_DIR "/Library/Frameworks/pylon.framework/Resources/licenses " )
386
+ set (PYLON_LICENSE_DIR "/Library/Frameworks/pylon.framework/Resources" )
387
387
else () # Linux
388
388
if (DEFINED ENV{PYLON_ROOT} )
389
389
set (PYLON_LICENSE_DIR "$ENV{PYLON_ROOT} /share/pylon/licenses" )
@@ -395,21 +395,33 @@ if(DEFINED SKBUILD_METADATA_DIR)
395
395
396
396
397
397
# Install main license if found
398
- if (EXISTS "${PYLON_LICENSE_DIR} /License.txt" )
399
- install (FILES "${PYLON_LICENSE_DIR} /License.txt"
400
- DESTINATION "${SKBUILD_METADATA_DIR} /licenses"
401
- RENAME "PYLON_LICENSE.txt" )
398
+ if (APPLE )
399
+ # macOS has license.txt (lowercase) in Resources folder
400
+ if (EXISTS "${PYLON_LICENSE_DIR} /license.txt" )
401
+ install (FILES "${PYLON_LICENSE_DIR} /license.txt"
402
+ DESTINATION "${SKBUILD_METADATA_DIR} /licenses"
403
+ RENAME "PYLON_LICENSE.txt" )
404
+ else ()
405
+ message (FATAL_ERROR "Pylon license not found at: ${PYLON_LICENSE_DIR} /license.txt" )
406
+ endif ()
402
407
else ()
403
- message (FATAL_ERROR "Pylon license not found at: ${PYLON_LICENSE_DIR} " )
404
- endif ()
408
+ # Windows and Linux have License.txt (uppercase)
409
+ if (EXISTS "${PYLON_LICENSE_DIR} /License.txt" )
410
+ install (FILES "${PYLON_LICENSE_DIR} /License.txt"
411
+ DESTINATION "${SKBUILD_METADATA_DIR} /licenses"
412
+ RENAME "PYLON_LICENSE.txt" )
413
+ else ()
414
+ message (FATAL_ERROR "Pylon license not found at: ${PYLON_LICENSE_DIR} /License.txt" )
415
+ endif ()
405
416
406
- # Install third-party licenses if found
407
- if (EXISTS "${PYLON_LICENSE_DIR} /pylon_Third-Party_Licenses.txt" )
408
- install (FILES "${PYLON_LICENSE_DIR} /pylon_Third-Party_Licenses.txt"
409
- DESTINATION "${SKBUILD_METADATA_DIR} /licenses"
410
- RENAME "PYLON_THIRD_PARTY_LICENSES.txt" )
411
- else ()
412
- message (FATAL_ERROR "Pylon third-party license not found at: ${PYLON_LICENSE_DIR} " )
417
+ # Install third-party licenses if found (Windows and Linux only)
418
+ if (EXISTS "${PYLON_LICENSE_DIR} /pylon_Third-Party_Licenses.txt" )
419
+ install (FILES "${PYLON_LICENSE_DIR} /pylon_Third-Party_Licenses.txt"
420
+ DESTINATION "${SKBUILD_METADATA_DIR} /licenses"
421
+ RENAME "PYLON_THIRD_PARTY_LICENSES.txt" )
422
+ else ()
423
+ message (FATAL_ERROR "Pylon third-party license not found at: ${PYLON_LICENSE_DIR} /pylon_Third-Party_Licenses.txt" )
424
+ endif ()
413
425
endif ()
414
426
else ()
415
427
message (WARNING "SKBUILD_METADATA_DIR not defined" )
0 commit comments