← All tasks
cppjrouwe/JoltPhysics #1426Not a task: already works

Add a version and alias name for Jolt library in CMake

envgap__jrouwe__JoltPhysics-1426

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
636b0802665880bb617716a8b03e7de79a2b3dfd
Manifest
Build/CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

jrouwe/JoltPhysics #1426 · read the original issue
Could a version be added to the `project`? It would be helpful to be able to specify the version of Jolt in `find_package`.



Use case would be something like:



```cmake

find_package(Jolt 5.2.0)

```



Also, could an ALIAS target be added for Jolt? e.g.



```cmake

# ...

add_library(Jolt ${JOLT_PHYSICS_SRC_FILES})

add_library(Jolt::Jolt ALIAS Jolt)

```



I see that Jolt already exports with a namespace as in



```cmake

	export(TARGETS Jolt

		NAMESPACE Jolt::

		FILE JoltConfig.cmake)

```



so it would be helpful to add a namespaced target for linking with Jolt when using `add_subdirectory`.



Use case would be something like:



```cmake

add_subdirectory(vendor/JoltPhysics/Build)

target_link_libraries(my-library PRIVATE Jolt::Jolt)

```



Disclaimer: I am not good at CMake, but I see other projects do this. I can writeup a quick PR if it's relevant!
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]