Repository navigation
Fix CMake config installation path to match package name - #1479
Conversation
|
What is this fixing? |
qjs not found error |
|
Isn't that just you using the wrong path? Can you show what you tried to do in your own cmake files that errored? |
|
|
|
I guess this is because the target name is qjs and thus cmake generates that directory? What would it take to change it to "quickjs" so projects do instead? |
|
@saghul sorry for a duplicate PR.
So if you do Line 562 in 14892f8 This line will generate |
No, that does not work. I tried both |
|
I think keeping things as is (plus this PR) is the right thing to do now, otherwise everyone might need to adapt their CMake files. We can reconsider that for 1.0 maybe. EDIT: Nevermind, I mixed the 2 PRs. I'm landing this. |
|
fd461ce introduces another inconsistency: the package name is find_package(${CMAKE_PACKAGE_NAME})
if (${CMAKE_PACKAGE_NAME}_FOUND)
if (${CMAKE_PACKAGE_NAME} STREQUAL quickjs)
set(CMAKE_PACKAGE_NAME qjs)
endif()
target_link_libraries(myproject PRIVATE ${CMAKE_PACKAGE_NAME})
endif()This is frustrating. @saghul Can we change the package name back to |
|
Fair point, we want the least amount of disruption. |
|
Would you like to send a PR? |
The qjsConfig.cmake should be named as quickjsConfig.cmake instead, in order to match the package name and help CMake (the
find_package(quickjs)command) find the requested library configuration.