Tweak CMakeLists.txt to build on macOS

This commit is contained in:
Aarni Koskela 2018-12-18 13:35:28 +02:00
parent 40defdf2e1
commit a9dd07ae1e

View File

@ -12,9 +12,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(PkgConfig REQUIRED)
pkg_check_modules(OGG REQUIRED ogg)
add_compile_options(${OGG_CFLAGS})
link_directories(${OGG_LIBRARY_DIRS})
configure_file(src/config.h.in config.h @ONLY)
include_directories(BEFORE src "${CMAKE_BINARY_DIR}")
include_directories(BEFORE src "${CMAKE_BINARY_DIR}" ${OGG_INCLUDE_DIRS})
add_library(
libopustags
@ -26,6 +27,10 @@ add_library(
)
target_link_libraries(libopustags PUBLIC ${OGG_LIBRARIES})
if (APPLE)
target_link_libraries(libopustags PUBLIC iconv)
endif()
add_executable(opustags src/opustags.cc)
target_link_libraries(opustags libopustags)