You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if the library could be downloaded, configured and installed as dependency for user's own projects in more automated way. The current CMakeLists.txt does not export and install package that would be easily consumed by other projects.
I had a few tries at it, but without success so far.
The install and export commands are also rather complicated to get right. A library such as PackageProject.cmake could help with this. In theory if CppServer's CMakeLists.txt would be perfect, the other project CPM.cmake by TheLartians should work for configuration step also. A custom approach might suit this project better. https://github.com/TheLartians/CPM.cmake https://github.com/TheLartians/PackageProject.cmake
# PackageProject.cmake will be used to make our target installable.
CPMAddPackage(
NAME PackageProject.cmake
GITHUB_REPOSITORY TheLartians/PackageProject.cmake
VERSION 1.4
)
packageProject(
NAME${REF_LIBRARY}VERSION${PACKAGE_VERSION}NAMESPACE${REF_LIBRARY}
BINARY_DIR ${${PACKAGE_PROJECT}_BINARY_DIR}/build
INCLUDE_DIR ${${PACKAGE_PROJECT}_SOURCE_DIR}/include
INCLUDE_DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PACKAGE_PUBLISHER}/${PACKAGE_REPOSITORY}
)
Custom install should have some commands like following
It would be nice if the library could be downloaded, configured and installed as dependency for user's own projects in more automated way. The current CMakeLists.txt does not export and install package that would be easily consumed by other projects.
I had a few tries at it, but without success so far.
The install and export commands are also rather complicated to get right. A library such as PackageProject.cmake could help with this. In theory if CppServer's CMakeLists.txt would be perfect, the other project CPM.cmake by TheLartians should work for configuration step also. A custom approach might suit this project better.
https://github.com/TheLartians/CPM.cmake
https://github.com/TheLartians/PackageProject.cmake
Custom install should have some commands like following
Exporting depends on whether using normal Targets or Component approach for project.
And somehow finally when that works, it is possible to use CppServer in own project in more straightforward way.
CppServer/install/lib/cmake/CppServer
CppServerTargets.cmake
CppServerConfig.cmake
CppServerConfigVersion.cmake
CppServer/install/include
And so on...
The text was updated successfully, but these errors were encountered: