hedgewars/avwrapper/CMakeLists.txt
author koda
Tue, 19 Mar 2013 17:14:10 +0100
branchcmake_pascal
changeset 8811 dcdfcddf37ee
child 9224 bce8cf41d666
permissions -rw-r--r--
move avwraper compilation in its own folder

#FFMPEG/Libav libraries have been searched already in main CMakeLists.txt

# TODO: this check is only for SDL < 2
# fpc will take care of linking but we need to have this library installed
find_package(GLUT REQUIRED)

#TODO: convert avwrapper to .pas unit so we can skip this step
include_directories(${FFMPEG_INCLUDE_DIR})

if(WIN32)
    # it's not possible to statically link libraries on windows, so let's build a shared version here
    add_library(avwrapper SHARED avwrapper.c)

    target_link_libraries(avwrapper ${FFMPEG_LIBRARIES})

    install(PROGRAMS "${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}avwrapper${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION ${target_library_install_dir})
else()
    add_library(avwrapper STATIC avwrapper.c)
endif()