Countly / Countly/countly-sdk-cpp
Using -DCMAKE_INSTALL_PREFIX with build produces flat include folder & does not include DLL
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 34
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
If you use -DCMAKE_INSTALL_PREFIX=[some folder] when generating the build files, and then use --target install, you get a badly formed output folder.
The DLL is the easiest one to fix.
install(TARGETS countly ARCHIVE DESTINATION lib PUBLIC_HEADER DESTINATION include/countly)
Should be
install(TARGETS countly ARCHIVE DESTINATION lib PUBLIC_HEADER DESTINATION include/countly RUNTIME DESTINATION bin)
This way, there will be a bin folder containing the countly.dll.
There are a few errors with the include setup. First, countly.hpp needs to be removed from COUNTLY_PUBLIC_HEADERS. While we're at it, add countly_configuration.hpp, which is missing!
Next, add this additional install step at the end of the file:
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/countly.hpp DESTINATION include)
This will separately install countly.hpp in the root include folder in the install directory, creating the expected setup.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the CMake install(TARGETS countly...) block and the COUNTLY_PUBLIC_HEADERS definition shown in the issue. Run a configured build with CMAKE_INSTALL_PREFIX and the install target, then verify that the installed layout has countly.dll under bin, countly.hpp under include, and the expected public headers under include/countly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100