Skip to content

Commit

Permalink
Merge pull request #88 from ned14/master
Browse files Browse the repository at this point in the history
Master
  • Loading branch information
ned14 authored Jan 12, 2022
2 parents 8861d60 + 4a117d6 commit cfea2b8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
26 changes: 25 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -494,14 +494,38 @@ endif()
# Cache this library's auto scanned sources for later reuse
include(QuickCppLibCacheLibrarySources)

# Dependencies needed to consume our cmake package
set(PROJECT_PACKAGE_DEPENDENCIES [=[
include(CMakeFindDependencyMacro)
find_dependency(quickcpplib)
find_dependency(outcome)
]=])

# Make available this library for install and export
include(QuickCppLibMakeInstall)
if(WIN32 AND NOT LLFIO_USE_EXPERIMENTAL_SG14_STATUS_CODE)
set_target_properties(ntkernel-error-category_hl PROPERTIES EXPORT_NAME ntkernel-error-category_hl)
set_target_properties(ntkernel-error-category_sl PROPERTIES EXPORT_NAME ntkernel-error-category_sl)
set_target_properties(ntkernel-error-category_dl PROPERTIES EXPORT_NAME ntkernel-error-category_dl)
install(TARGETS ntkernel-error-category_hl ntkernel-error-category_sl ntkernel-error-category_dl
install(TARGETS ntkernel-error-category_hl
EXPORT llfioExports
COMPONENT headers
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
)
install(TARGETS ntkernel-error-category_sl
EXPORT llfioSlExports
COMPONENT sl
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
)
install(TARGETS ntkernel-error-category_dl
EXPORT llfioDlExports
COMPONENT dl
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
Expand Down
6 changes: 5 additions & 1 deletion cmake/QuickCppLibBootstrap.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ endforeach()
if(NOT quickcpplib_done AND quickcpplib_DIR)
find_package(quickcpplib QUIET CONFIG)
if(quickcpplib_FOUND)
if(EXISTS "${quickcpplib_DIR}/share/cmakelib")
if(DEFINED quickcpplib_CMAKELIB_DIR AND DEFINED quickcpplib_SCRIPTS_DIR)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${quickcpplib_CMAKELIB_DIR}")
set(CTEST_QUICKCPPLIB_SCRIPTS "${quickcpplib_SCRIPTS_DIR}")
set(quickcpplib_done ON)
elseif(EXISTS "${quickcpplib_DIR}/share/cmakelib")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${quickcpplib_DIR}/share/cmakelib")
set(CTEST_QUICKCPPLIB_SCRIPTS "${quickcpplib_DIR}/share/scripts")
set(quickcpplib_done ON)
Expand Down

0 comments on commit cfea2b8

Please sign in to comment.