From a343665035fb13f2c267910546f39a1880d758ee Mon Sep 17 00:00:00 2001 From: CharlesThobe Date: Thu, 6 Jan 2022 04:18:59 +0200 Subject: [PATCH] Remove librt which isn't available on macOS inconsequential cmake edits as well --- CMakeLists.txt | 2 +- cmake_subdirs/flac/CMakeLists.txt | 2 +- cmake_subdirs/zlib/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e6411cd..78aea8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,4 +53,4 @@ target_compile_definitions(chdman PRIVATE ) target_link_libraries(chdman PRIVATE utils expat 7z ocore_sdl zlib flac utf8proc -dl rt m pthread util) +dl m pthread util) diff --git a/cmake_subdirs/flac/CMakeLists.txt b/cmake_subdirs/flac/CMakeLists.txt index bf9dcbd..341f73f 100644 --- a/cmake_subdirs/flac/CMakeLists.txt +++ b/cmake_subdirs/flac/CMakeLists.txt @@ -14,7 +14,7 @@ if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles" OR ${CMAKE_GENERATOR} STREQUAL " set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function -O0") endif() -if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") #fixme: or android +if(CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_SYSTEM_NAME STREQUAL "Android") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-enum-conversion") endif() diff --git a/cmake_subdirs/zlib/CMakeLists.txt b/cmake_subdirs/zlib/CMakeLists.txt index 087cdbc..36d050d 100644 --- a/cmake_subdirs/zlib/CMakeLists.txt +++ b/cmake_subdirs/zlib/CMakeLists.txt @@ -1,7 +1,7 @@ #zlib set(zlib_dir ${CMAKE_SOURCE_DIR}/3rdparty/zlib) -if(CMAKE_C_COMPILER_ID STREQUAL "Clang") #fixme: or android +if(CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_SYSTEM_NAME STREQUAL "Android") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-shift-negative-value") endif()