ports/sysutils/k3b-kde4/files/patch-CMakeLists.txt
Raphael Kubo da Costa 734d437047 Unbreak after r436971.
After the kdelibs update to 4.11.30 the CMake policies used by kdelibs-based
projects got stricter.

- Fix `make configure'. The upstream git repository has a add_subdirectory(doc)
  call, but the code generating the release tarball also added a
  macro_optional_add_subdirectory(doc) call that was causing CMake to error out
  due to the same directory being added twice to the build system.
- Fix `make build' with the MUSEPACK option. The FindMuse.cmake patch from
  r346999 was hardcoding MUSE_LIBRARIES the wrong way. The find_library() call
  should have been kept, otherwise the linker is passed "-lmpcdec" instead of
  "/full/path/to/libmpcdec.so".
2017-03-27 13:39:03 +00:00

26 lines
1 KiB
Text

Hunk 1: Pass -std=c99 when building with clang as well as GCC.
Hunk 2: Stop adding the doc/ directory twice, there is another entry for it
at the end of the file.
--- CMakeLists.txt.orig 2014-11-04 18:43:47 UTC
+++ CMakeLists.txt
@@ -106,10 +106,10 @@ if(K3B_BUILD_FFMPEG_DECODER_PLUGIN)
include(CMakePushCheckState)
cmake_push_check_state()
- if(CMAKE_COMPILER_IS_GNUCC)
+ if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
# FindKDE4Internal.cmake screws things up
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} -std=c99)
- endif(CMAKE_COMPILER_IS_GNUCC)
+ endif(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
if(FFMPEG_INCLUDE_DIR_OLD_STYLE)
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${FFMPEG_INCLUDE_DIR_OLD_STYLE})
@@ -339,7 +339,6 @@ add_subdirectory( libk3b )
add_subdirectory( src )
add_subdirectory( kioslaves )
add_subdirectory( plugins )
-add_subdirectory( doc )
if(BUILD_K3BSETUP)
add_subdirectory(k3bsetup)
endif(BUILD_K3BSETUP)