Skip to content

Commit

Permalink
Add CMake Install rules (abseil#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Oct 23, 2018
1 parent 48aecef commit a8a6aef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMake/absl-config.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include("${CMAKE_CURRENT_LIST_DIR}/absl-targets.cmake"
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake)
include(GNUInstallDirs)
include(AbseilHelpers)


# config options
if (MSVC)
# /wd4005 macro-redefinition
Expand Down Expand Up @@ -103,3 +102,12 @@ if(BUILD_TESTING)
endif()

add_subdirectory(absl)

set(CMAKE_INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
install(EXPORT ${PROJECT_NAME}-targets
NAMESPACE absl::
DESTINATION ${CMAKE_INSTALL_CONFIGDIR}
)
install(FILES CMake/${PROJECT_NAME}-config.cmake
DESTINATION ${CMAKE_INSTALL_CONFIGDIR}
)

0 comments on commit a8a6aef

Please sign in to comment.