Files
conan-build/recipes/flac/all/patches/fix-cmake-1.3.3.patch
2024-12-25 17:47:28 +03:00

49 lines
1.8 KiB
Diff

--- 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(
$<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:${HAVE_DECL_AFTER_STMT_FLAG}>>:-Wdeclaration-after-statement>)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" AND HAVE_STACKREALIGN_FLAG)
- add_compile_options(-mstackrealign)
+ add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-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
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
-target_link_libraries(FLAC PRIVATE $<$<BOOL:${HAVE_LROUND}>:m>)
+target_link_libraries(FLAC PUBLIC $<$<BOOL:${HAVE_LROUND}>: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}")