hedgewars/avwrapper/CMakeLists.txt
branchcmake_pascal
changeset 8811 dcdfcddf37ee
child 9224 bce8cf41d666
equal deleted inserted replaced
8809:8ce66f1106f1 8811:dcdfcddf37ee
       
     1 #FFMPEG/Libav libraries have been searched already in main CMakeLists.txt
       
     2 
       
     3 # TODO: this check is only for SDL < 2
       
     4 # fpc will take care of linking but we need to have this library installed
       
     5 find_package(GLUT REQUIRED)
       
     6 
       
     7 #TODO: convert avwrapper to .pas unit so we can skip this step
       
     8 include_directories(${FFMPEG_INCLUDE_DIR})
       
     9 
       
    10 if(WIN32)
       
    11     # it's not possible to statically link libraries on windows, so let's build a shared version here
       
    12     add_library(avwrapper SHARED avwrapper.c)
       
    13 
       
    14     target_link_libraries(avwrapper ${FFMPEG_LIBRARIES})
       
    15 
       
    16     install(PROGRAMS "${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}avwrapper${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION ${target_library_install_dir})
       
    17 else()
       
    18     add_library(avwrapper STATIC avwrapper.c)
       
    19 endif()
       
    20