ffconv/examples/CMakeLists.txt

29 lines
962 B
CMake

option(BUILD_WITH_TSAN "Build with thread sanitizer" OFF)
option(BUILD_WITH_ASAN "Build with address sanitizer" OFF)
if(BUILD_WITH_TSAN)
SET(THREAD_SANITIZER_FLAG "-fsanitize=thread")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${THREAD_SANITIZER_FLAG}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${THREAD_SANITIZER_FLAG}")
SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${THREAD_SANITIZER_FLAG} -ltsan" )
endif()
project(ffConv)
add_executable(ffConv ffConv.cpp)
add_dependencies(ffConv ffcpp)
target_link_libraries(ffConv ffcpp)
project(ffPreview)
add_executable(ffPreview ffPreview.cpp)
add_dependencies(ffPreview ffcpp)
target_link_libraries(ffPreview ffcpp)
project(ffPlayer)
find_package(SDL2 REQUIRED)
if(NOT SDL2_FOUND)
message(FATAL_ERROR "SDL2 not found")
endif()
include_directories(${SDL2_INCLUDE_DIR})
add_executable(ffPlayer ffPlayer.cpp)
add_dependencies(ffPlayer ffcpp)
target_link_libraries(ffPlayer ffcpp ${SDL2_LIBRARY})