hedgewars/CMakeLists.txt
branchcmake_pascal
changeset 8811 dcdfcddf37ee
parent 8804 32bc222ddca6
child 8813 a932b10fc1d0
--- a/hedgewars/CMakeLists.txt	Tue Mar 19 16:47:53 2013 +0100
+++ b/hedgewars/CMakeLists.txt	Tue Mar 19 17:14:10 2013 +0100
@@ -140,7 +140,6 @@
         set(powerpc_build "powerpc")
     endif()
 
-
     #on OSX we need to provide the SDL_main() function when building as executable
     if(NOT ${BUILD_ENGINE_LIBRARY})
         add_subdirectory(sdlmain)
@@ -150,20 +149,7 @@
 
 
 if(${FFMPEG_FOUND})
-    # 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)
-        # there are some problems with linking our avwrapper as static lib, so link it as shared
-        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()
+    add_subdirectory(avwrapper)
     add_definitions(-dUSE_VIDEO_RECORDING)
     add_flag_append(CMAKE_Pascal_FLAGS -Fl${LIBRARY_OUTPUT_PATH})
 endif()