Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Commit

Permalink
Fix CMakeLists.txt for non-make generators (#94)
Browse files Browse the repository at this point in the history
The hack to make __FILE__ relative to the project directory doesn't work with non Make generators, so make it optional instead.
In general, Ninja is a better tool, so it is nice to support
  • Loading branch information
Orphis authored Feb 5, 2020
1 parent 1a396e7 commit 5b546e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ project(pulseaudio_modules_bt C)
set(CMAKE_C_STANDARD 11)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_C_FLAGS "$ENV{CFLAGS} -O2 -Wall -Wno-builtin-macro-redefined -Wno-unused -fno-common -DFASTPATH")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILE__='\"$(subst ${CMAKE_SOURCE_DIR}/src/,,$(abspath $<))\"'")
if(CMAKE_GENERATOR STREQUAL "Unix Makefiles")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILE__='\"$(subst ${CMAKE_SOURCE_DIR}/src/,,$(abspath $<))\"'")
endif()

option(CODEC_AAC_FDK "LC-AAC support using fdk-aac(-free)" ON)
option(CODEC_APTX_FF "aptX Classic support using FFmpeg" ON)
Expand Down

0 comments on commit 5b546e1

Please sign in to comment.