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.
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.
Should be
This way, there will be a
binfolder containing thecountly.dll.There are a few errors with the include setup. First,
countly.hppneeds to be removed fromCOUNTLY_PUBLIC_HEADERS. While we're at it, addcountly_configuration.hpp, which is missing!Next, add this additional install step at the end of the file:
This will separately install
countly.hppin the rootincludefolder in the install directory, creating the expected setup.