Skip to content
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

Possible malformed output dir string caused by typo in CMakeLists.txt #3373

Closed
nathanjhood opened this issue Apr 6, 2023 · 1 comment
Closed

Comments

@nathanjhood
Copy link

nathanjhood commented Apr 6, 2023

Hi! :)

Found a strange error in the outputted 'cmake_install.cmake', per below screenshot and quote (also visible on the current master branch, where I pulled fmt from a few hours ago);

Screenshot 2023-04-06 075211

Note the additional chars in the red-highlighted directory paths, like unresolved vars...? I believe that Lines 336 - 339 contain an unresolved var;

install(FILES $<TARGET_PDB_FILE:${INSTALL_TARGETS}>
        DESTINATION ${FMT_LIB_DIR} OPTIONAL)
install(FILES "${pkgconfig}" DESTINATION "${FMT_PKGCONFIG_DIR}")

Perhaps the FILES parameter should be resolved again(?):

install(FILES ${$<TARGET_PDB_FILE:${INSTALL_TARGETS}>}
        DESTINATION ${FMT_LIB_DIR} OPTIONAL)
install(FILES "${pkgconfig}" DESTINATION "${FMT_PKGCONFIG_DIR}")

Also, in your root folder 'CMakeLists.txt' on current main branch (lines 240 - 242):

target_include_directories(fmt ${FMT_SYSTEM_HEADERS_ATTRIBUTE} PUBLIC
  $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
  $<INSTALL_INTERFACE:${FMT_INC_DIR}>)

(note the errant closing parenthesis - the final char in the quote).

The same appears for the header-only target:

target_include_directories(fmt-header-only ${FMT_SYSTEM_HEADERS_ATTRIBUTE} INTERFACE
  $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
  $<INSTALL_INTERFACE:${FMT_INC_DIR}>)

Cheers and thanks so much for the awesome lib, and insights into the workings CMake!

@vitaut
Copy link
Contributor

vitaut commented Apr 8, 2023

This part does look broken which also suggests that nobody relies on it. Removed in e406ddb. Thanks for reporting!

@vitaut vitaut closed this as completed Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants