--- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,9 +25,6 @@ endif() if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef") endif() -if(CMAKE_C_COMPILER_ID MATCHES "GNU") - set(CMAKE_EXE_LINKER_FLAGS -no-pie) -endif() include(CMakePackageConfigHelpers) include(CPack) @@ -76,7 +73,7 @@ add_compile_options( $<$,$>:-Wdeclaration-after-statement>) if(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" AND HAVE_STACKREALIGN_FLAG) - add_compile_options(-mstackrealign) + add_compile_options($<$,$>:-mstackrealign>) endif() include_directories("include") --- a/src/flac/CMakeLists.txt +++ b/src/flac/CMakeLists.txt @@ -21,4 +21,4 @@ if(TARGET win_utf8_io) endif() install(TARGETS flacapp EXPORT targets - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") + DESTINATION "${CMAKE_INSTALL_BINDIR}") --- a/src/libFLAC/CMakeLists.txt +++ b/src/libFLAC/CMakeLists.txt @@ -102,7 +102,7 @@ target_compile_definitions(FLAC target_include_directories(FLAC INTERFACE "$" "$") -target_link_libraries(FLAC PRIVATE $<$:m>) +target_link_libraries(FLAC PUBLIC $<$:m>) if(TARGET Ogg::ogg) target_link_libraries(FLAC PUBLIC Ogg::ogg) endif() --- a/src/metaflac/CMakeLists.txt +++ b/src/metaflac/CMakeLists.txt @@ -15,4 +15,4 @@ if(TARGET win_utf8_io) endif() install(TARGETS metaflac EXPORT targets - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") + DESTINATION "${CMAKE_INSTALL_BINDIR}")