Merge b592f952d6 into ac5484c4e7
This commit is contained in:
commit
6d56f6d6ea
@ -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>)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user