hedgewars/avwrapper/CMakeLists.txt
author koda
Wed, 20 Mar 2013 18:31:13 +0100
branchcmake_pascal
changeset 8821 e85ff6e298b5
parent 8811 dcdfcddf37ee
child 9224 bce8cf41d666
permissions -rw-r--r--
adjust verbosity, move debug/release variables in the right section
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8811
dcdfcddf37ee move avwraper compilation in its own folder
koda
parents:
diff changeset
     1
#FFMPEG/Libav libraries have been searched already in main CMakeLists.txt
dcdfcddf37ee move avwraper compilation in its own folder
koda
parents:
diff changeset
     2
dcdfcddf37ee move avwraper compilation in its own folder
koda
parents:
diff changeset
     3
# TODO: this check is only for SDL < 2
dcdfcddf37ee move avwraper compilation in its own folder
koda
parents:
diff changeset
     4
# fpc will take care of linking but we need to have this library installed
dcdfcddf37ee move avwraper compilation in its own folder
koda
parents:
diff changeset
     5
find_package(GLUT REQUIRED)
dcdfcddf37ee move avwraper compilation in its own folder
koda
parents:
diff changeset
     6
dcdfcddf37ee move avwraper compilation in its own folder
koda
parents:
diff changeset
     7
#TODO: convert avwrapper to .pas unit so we can skip this step
dcdfcddf37ee move avwraper compilation in its own folder
koda
parents:
diff changeset
     8
include_directories(${FFMPEG_INCLUDE_DIR})
dcdfcddf37ee move avwraper compilation in its own folder
koda
parents:
diff changeset
     9
dcdfcddf37ee move avwraper compilation in its own folder
koda
parents:
diff changeset
    10
if(WIN32)
dcdfcddf37ee move avwraper compilation in its own folder
koda
parents:
diff changeset
    11
    # it's not possible to statically link libraries on windows, so let's build a shared version here
dcdfcddf37ee move avwraper compilation in its own folder
koda
parents:
diff changeset
    12
    add_library(avwrapper SHARED avwrapper.c)
dcdfcddf37ee move avwraper compilation in its own folder
koda
parents:
diff changeset
    13
dcdfcddf37ee move avwraper compilation in its own folder
koda
parents:
diff changeset
    14
    target_link_libraries(avwrapper ${FFMPEG_LIBRARIES})
dcdfcddf37ee move avwraper compilation in its own folder
koda
parents:
diff changeset
    15
dcdfcddf37ee move avwraper compilation in its own folder
koda
parents:
diff changeset
    16
    install(PROGRAMS "${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}avwrapper${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION ${target_library_install_dir})
dcdfcddf37ee move avwraper compilation in its own folder
koda
parents:
diff changeset
    17
else()
dcdfcddf37ee move avwraper compilation in its own folder
koda
parents:
diff changeset
    18
    add_library(avwrapper STATIC avwrapper.c)
dcdfcddf37ee move avwraper compilation in its own folder
koda
parents:
diff changeset
    19
endif()
dcdfcddf37ee move avwraper compilation in its own folder
koda
parents:
diff changeset
    20