diff --git a/CMakeLists.txt b/CMakeLists.txt index d69a5b57f..932ac513e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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