Changeset View
Changeset View
Standalone View
Standalone View
native/cpp/CommonCpp/CryptoTools/CMakeLists.txt
Show All 17 Lines | set(CRYPTO_SRCS | ||||
"Tools.cpp" | "Tools.cpp" | ||||
) | ) | ||||
add_library(comm-cryptotools | add_library(comm-cryptotools | ||||
${CRYPTO_HDRS} | ${CRYPTO_HDRS} | ||||
${CRYPTO_SRCS} | ${CRYPTO_SRCS} | ||||
) | ) | ||||
find_package(Olm) | |||||
target_link_libraries(comm-cryptotools | target_link_libraries(comm-cryptotools | ||||
Olm::Olm | Olm::Olm | ||||
) | ) | ||||
# reference local directory when building, use installation path when installing | # reference local directory when building, use installation path when installing | ||||
target_include_directories(comm-cryptotools | target_include_directories(comm-cryptotools | ||||
PUBLIC | PUBLIC | ||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..> | $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..> | ||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/> | $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/> | ||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> | $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> | ||||
) | ) | ||||
install(TARGETS comm-cryptotools EXPORT comm-cryptotools-export | |||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT comm-cryptotools | |||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT comm-cryptotools | |||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT comm-cryptotools | |||||
) | |||||
install(FILES ${TOOLS_HDRS} DESTINATION include/Tools) | |||||
set(_builddir_export_path cmake/comm-cryptotools/comm-cryptotools-targets.cmake) | |||||
export(TARGETS comm-cryptotools | |||||
NAMESPACE comm-cryptotools:: | |||||
FILE ${CMAKE_CURRENT_BINARY_DIR}/${_builddir_export_path} | |||||
) | |||||
# For installation | |||||
install(EXPORT comm-cryptotools-export | |||||
FILE comm-cryptotools-targets.cmake | |||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/comm-cryptotools | |||||
NAMESPACE comm-cryptotools:: | |||||
) |