only assign options to notcurses++ with USE_CXX

cmake otherwise blows up. closes #2835.
This commit is contained in:
nick black 2025-01-11 13:13:10 -05:00
parent aaf1ff69e3
commit 092fab5605
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -509,7 +509,7 @@ endif()
set_target_properties(
notcurses++-static PROPERTIES
OUTPUT_NAME notcurses++
)
)
set_target_properties(
notcurses++ PROPERTIES
@ -572,7 +572,23 @@ target_compile_definitions(notcurses++-static
PUBLIC
${NCPP_COMPILE_DEFINITIONS_PUBLIC}
)
endif()
target_compile_options(notcurses++-static
PRIVATE
${NCPP_COMPILE_OPTIONS}
-fPIE
)
target_compile_definitions(notcurses++
PUBLIC
${NCPP_COMPILE_DEFINITIONS_PUBLIC}
)
target_compile_definitions(notcurses++-static
PUBLIC
${NCPP_COMPILE_DEFINITIONS_PUBLIC}
)
endif() # end USE_CXX block
target_compile_options(notcurses-core
PRIVATE
@ -594,22 +610,6 @@ target_compile_options(notcurses-static
-fPIE
)
target_compile_options(notcurses++-static
PRIVATE
${NCPP_COMPILE_OPTIONS}
-fPIE
)
target_compile_definitions(notcurses++
PUBLIC
${NCPP_COMPILE_DEFINITIONS_PUBLIC}
)
target_compile_definitions(notcurses++-static
PUBLIC
${NCPP_COMPILE_DEFINITIONS_PUBLIC}
)
file(GLOB NCPP_HEADERS
CONFIGURE_DEPENDS
LIST_DIRECTORIES false