[CMake] explicitly set -fPIE/-fPIC

This commit is contained in:
Nick Black 2021-12-28 00:34:53 -05:00
parent 94944abd51
commit 61cfc8282e

View File

@ -525,7 +525,6 @@ set(NCPP_COMPILE_OPTIONS
-fno-strict-aliasing -fno-strict-aliasing
-ffunction-sections -ffunction-sections
-fno-rtti -fno-rtti
-fpic
) )
set(NCPP_COMPILE_DEFINITIONS_PUBLIC set(NCPP_COMPILE_DEFINITIONS_PUBLIC
@ -535,22 +534,44 @@ set(NCPP_COMPILE_DEFINITIONS_PUBLIC
target_compile_options(notcurses++ target_compile_options(notcurses++
PRIVATE PRIVATE
${NCPP_COMPILE_OPTIONS} ${NCPP_COMPILE_OPTIONS}
-fPIC
) )
target_compile_options(notcurses-core
PRIVATE
-fPIC
)
target_compile_options(notcurses-core-static
PRIVATE
-fPIE
)
target_compile_options(notcurses
PRIVATE
-fPIC
)
target_compile_options(notcurses-static
PRIVATE
-fPIE
)
target_compile_options(notcurses++-static target_compile_options(notcurses++-static
PRIVATE PRIVATE
${NCPP_COMPILE_OPTIONS} ${NCPP_COMPILE_OPTIONS}
) -fPIE
)
target_compile_definitions(notcurses++ target_compile_definitions(notcurses++
PUBLIC PUBLIC
${NCPP_COMPILE_DEFINITIONS_PUBLIC} ${NCPP_COMPILE_DEFINITIONS_PUBLIC}
) )
target_compile_definitions(notcurses++-static target_compile_definitions(notcurses++-static
PUBLIC PUBLIC
${NCPP_COMPILE_DEFINITIONS_PUBLIC} ${NCPP_COMPILE_DEFINITIONS_PUBLIC}
) )
file(GLOB NOTCURSES_HEADERS file(GLOB NOTCURSES_HEADERS
CONFIGURE_DEPENDS CONFIGURE_DEPENDS