Skip to content

Commit

Permalink
Merge daebcb3 into 135015f
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasVautherin committed Aug 16, 2019
2 parents 135015f + daebcb3 commit a91a630
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions CMakeLists.txt
Expand Up @@ -14,15 +14,9 @@ if(CMAKE_CXX_STANDARD LESS 11)
endif()

add_library(ghc_filesystem INTERFACE)
target_sources(ghc_filesystem INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/include/ghc/filesystem.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/ghc/fs_fwd.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/ghc/fs_impl.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/ghc/fs_std.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/ghc/fs_std_fwd.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/ghc/fs_std_impl.hpp
)
target_include_directories(ghc_filesystem INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_include_directories(ghc_filesystem INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_compile_options(ghc_filesystem INTERFACE "$<$<C_COMPILER_ID:MSVC>:/utf-8>")
target_compile_options(ghc_filesystem INTERFACE "$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")

Expand All @@ -46,14 +40,5 @@ include(CMakePackageConfigHelpers)
include(GNUInstallDirs)

install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR})
set(PACKAGECONFIG_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})

configure_package_config_file(cmake/config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
INSTALL_DESTINATION ${PACKAGECONFIG_INSTALL_DIR}
PATH_VARS INCLUDE_INSTALL_DIR)

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
DESTINATION ${PACKAGECONFIG_INSTALL_DIR})
install(TARGETS ghc_filesystem EXPORT ghcFilesystemConfig)
install(EXPORT ghcFilesystemConfig NAMESPACE ghcFilesystem:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ghcFilesystem)

0 comments on commit a91a630

Please sign in to comment.