-
Notifications
You must be signed in to change notification settings - Fork 43
vcpkg install iccdev #473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
vcpkg install iccdev #473
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request modernizes the RefIccMAX CMake configuration file by transforming it from a basic find module into a comprehensive CMake package configuration file. The changes enable better integration with modern CMake projects and vcpkg package management.
Key changes:
- Introduces modern IMPORTED targets (IccProfLib2, IccXML2, and their static variants) following current CMake best practices
- Adds comprehensive documentation and usage examples for both modern targets and legacy variables
- Implements proper library detection for both shared and static library variants, including debug builds
- Maintains full backward compatibility with existing projects using legacy variables (REFICCMAX_LIBRARIES, REFICCMAX_INCLUDE_DIRS)
| IMPORTED_LOCATION_DEBUG "${ICCXML2_LIBRARY_DEBUG}" | ||
| ) | ||
| endif() | ||
| if(TARGET IccProfLib2) | ||
| set_target_properties(IccXML2 PROPERTIES | ||
| INTERFACE_LINK_LIBRARIES IccProfLib2 | ||
| ) |
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The IccXML2 library's INTERFACE_LINK_LIBRARIES is set to IccProfLib2 (line 166), but there's no check whether IccProfLib2 was found as a shared or static library. If IccProfLib2 is static and IccXML2 is shared, this could cause linking issues. Consider linking to the appropriate variant (IccProfLib2-static if IccXML2 is static, IccProfLib2 if shared) based on which library type was found.
| IMPORTED_LOCATION_DEBUG "${ICCXML2_LIBRARY_DEBUG}" | |
| ) | |
| endif() | |
| if(TARGET IccProfLib2) | |
| set_target_properties(IccXML2 PROPERTIES | |
| INTERFACE_LINK_LIBRARIES IccProfLib2 | |
| ) | |
| IMPORTED_LOCATION_DEBUG "${ICC2XML_LIBRARY_DEBUG}" | |
| ) | |
| endif() | |
| if(TARGET IccProfLib2) | |
| # Prefer linking against shared IccProfLib2 when available | |
| set_target_properties(IccXML2 PROPERTIES | |
| INTERFACE_LINK_LIBRARIES IccProfLib2 | |
| ) | |
| elseif(TARGET IccProfLib2-static) | |
| # Fallback: link against static IccProfLib2-static if only static is available | |
| set_target_properties(IccXML2 PROPERTIES | |
| INTERFACE_LINK_LIBRARIES IccProfLib2-static | |
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential True Positive. Testing in Progress.
|
|
||
| # IccProfLib2 shared library | ||
| if(ICCPROFLIB2_LIBRARY AND NOT TARGET IccProfLib2) | ||
| add_library(IccProfLib2 SHARED IMPORTED) |
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ICCPROFLIB2_LIBRARY is marked as SHARED IMPORTED (line 125), but there's no verification that the library is actually shared. The find_library command finds any library with the given name regardless of type. If a static library is found instead, this will cause a mismatch. Consider using UNKNOWN IMPORTED instead of SHARED IMPORTED and setting the IMPORTED_LINK_INTERFACE_LIBRARIES property appropriately, or verify the library type before creating the target.
| add_library(IccProfLib2 SHARED IMPORTED) | |
| add_library(IccProfLib2 UNKNOWN IMPORTED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential True Positive. Testing in Progress.
|
|
||
| # IccXML2 shared library | ||
| if(ICCXML2_LIBRARY AND NOT TARGET IccXML2) | ||
| add_library(IccXML2 SHARED IMPORTED) |
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The IccXML2 library is marked as SHARED IMPORTED (line 154), but there's no verification that the library is actually shared. The find_library command finds any library with the given name regardless of type. If a static library is found instead, this will cause a mismatch. Consider using UNKNOWN IMPORTED instead of SHARED IMPORTED, or verify the library type before creating the target.
| add_library(IccXML2 SHARED IMPORTED) | |
| add_library(IccXML2 UNKNOWN IMPORTED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential True Positive. Testing in Progress.
| # Fallback for system-wide installation | ||
| find_path(REFICCMAX_INCLUDE_DIR | ||
| NAMES @TARGET_LIB_ICCPROFLIB@/IccProfLibVer.h | ||
| PATHS @CMAKE_INSTALL_FULL_INCLUDEDIR@/@TARGET_INCLUDE_FOLDER@ |
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fallback find_path for REFICCMAX_INCLUDE_DIR (lines 54-57) will search system-wide paths, but it may find an incompatible version if RefIccMAX is installed system-wide. This could cause version mismatches. Consider adding a VERSION check or making the NO_DEFAULT_PATH behavior stricter to avoid mixing installation locations.
| # Fallback for system-wide installation | |
| find_path(REFICCMAX_INCLUDE_DIR | |
| NAMES @TARGET_LIB_ICCPROFLIB@/IccProfLibVer.h | |
| PATHS @CMAKE_INSTALL_FULL_INCLUDEDIR@/@TARGET_INCLUDE_FOLDER@ | |
| # Fallback for system-wide installation (restricted to explicit paths) | |
| find_path(REFICCMAX_INCLUDE_DIR | |
| NAMES @TARGET_LIB_ICCPROFLIB@/IccProfLibVer.h | |
| PATHS @CMAKE_INSTALL_FULL_INCLUDEDIR@/@TARGET_INCLUDE_FOLDER@ | |
| NO_DEFAULT_PATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential True Positive. Testing in Progress.
| find_package_handle_standard_args(RefIccMAX | ||
| REQUIRED_VARS REFICCMAX_INCLUDE_DIR | ||
| VERSION_VAR REFICCMAX_VERSION | ||
| HANDLE_COMPONENTS |
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The HANDLE_COMPONENTS option is specified in find_package_handle_standard_args (line 106), but there's no code to actually handle components. This will cause CMake to fail if users specify components like find_package(RefIccMAX COMPONENTS IccProfLib2). Either remove HANDLE_COMPONENTS or implement proper component handling by checking RefIccMAX_FIND_COMPONENTS and setting component-specific FOUND variables.
| HANDLE_COMPONENTS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential True Positive. Testing in Progress.
23e5549 to
42afd45
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
StatusModify │ 301 * Function: GetInstance() │ and.... Class Mods... 97 * Purpose: The Reflectance Observer Element │ |
StatusConsidering the issues present, the Libs install across all platforms as expected. The Tools are not ready.
|
vcpkg compile errorsSample iccDumpProfile.cpp.obj : error LNK2001: unresolved external symbol "char const * const icMsgValidateWarning" (?icMsgValidateWarning@@3PEBDEB) |
Pull Request Checklist