This commit is contained in:
Eric 2017-05-25 12:00:20 +00:00 committed by GitHub
commit 6d56f6d6ea

View File

@ -1,3 +1,5 @@
include(CheckCXXCompilerFlag)
# Define the fmt library, its includes and the needed defines.
# *.cc are added to FMT_HEADERS for the header-only configuration.
set(FMT_HEADERS container.h format.h format.cc ostream.h ostream.cc printf.h
@ -24,6 +26,11 @@ if (FMT_PEDANTIC)
target_compile_options(fmt PRIVATE ${PEDANTIC_COMPILE_FLAGS})
endif ()
check_cxx_compiler_flag(-fPIC FMT_HAS_FPIC_FLAG)
if (FMT_HAS_FPIC_FLAG)
target_compile_options(fmt PRIVATE -fPIC)
endif()
target_include_directories(fmt PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>)