Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install exports #53

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,21 @@ endif()
# Install the dynamic/shared library
if(CASS_BUILD_SHARED)
install(TARGETS scylla-cpp-driver
EXPORT ScyllaCppDriver
RUNTIME DESTINATION ${INSTALL_DLL_EXE_DIR} # for dll/executable/pdb files
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} # for shared library
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) # for static library
# Install the export file
install(EXPORT ScyllaCppDriver
FILE ScyllaCppDriver.cmake
NAMESPACE ScyllaCppDriver::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ScyllaCppDriver
)
# Export our library target so someone can build it as part of their build
export(EXPORT ScyllaCppDriver
FILE "${CMAKE_CURRENT_BINARY_DIR}/cmake/ScyllaCppDriver.cmake"
NAMESPACE ScyllaCppDriver::
)
if(CASS_INSTALL_PKG_CONFIG)
if(NOT WIN32)
if(PKG_CONFIG_FOUND)
Expand All @@ -293,9 +305,21 @@ endif()

if(CASS_BUILD_STATIC)
install(TARGETS cassandra_static
EXPORT ScyllaCppDriverStatic
RUNTIME DESTINATION ${INSTALL_DLL_EXE_DIR} # for dll/executable/pdb files
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} # for shared library
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) # for static library

install(EXPORT ScyllaCppDriverStatic
FILE ScyllaCppDriverStatic.cmake
NAMESPACE ScyllaCppDriverStatic::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ScyllaCppDriverStatic
)
# Export our library target so someone can build it as part of their build
export(EXPORT ScyllaCppDriverStatic
FILE "${CMAKE_CURRENT_BINARY_DIR}/cmake/ScyllaCppDriverStatic.cmake"
NAMESPACE ScyllaCppDriverStatic::
)
if(CASS_INSTALL_PKG_CONFIG)
if(NOT WIN32)
if(PKG_CONFIG_FOUND)
Expand Down