hedgewars/avwrapper/CMakeLists.txt
branchcmake_pascal
changeset 8811 dcdfcddf37ee
child 9224 bce8cf41d666
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/avwrapper/CMakeLists.txt	Tue Mar 19 17:14:10 2013 +0100
@@ -0,0 +1,20 @@
+#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()
+