Closed
Description
Describe the bug
The CMake build is missing key features to be properly usable via CMake's FetchContent module.
Describe how to reproduce the bug
Steps to reproduce the behavior:
- In a downstream CMake project, do
include(FetchContent)
FetchContent_Declare(
open-simulation-interface
GIT_REPOSITORY https://github.com/OpenSimulationInterface/open-simulation-interface.git
GIT_TAG v3.3.1
)
FetchContent_MakeAvailable(open-simulation-interface)
- This will
a. pollute your upstream project's cache with non-prefixed variablesINSTALL_LIB_DIR
,INSTALL_INCLUDE_DIR
, andINSTALL_CMAKE_DIR
b. not provide namespaced alias targets e.g.open-simulation-interface::static
c. not install the export set with a namespace
d. pollute the downstream project's build with an unnecessary, redundant warning:
open-simulation-interface/CMakeLists.txt
Line 186 in ab60959
Describe the expected behavior
- prefix cache variables with the project name
- provide namespaced alias targets usable from the build tree
- provide a namespace for the export set
- do not warn unnecessarily
Metadata
Metadata
Assignees
Labels
No labels