aboutsummaryrefslogtreecommitdiff
path: root/ports/bento4/fix-install-and-c4996-error.patch
blob: c99fdc411a96e847e734019c0938aad6b0918631 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f08b2f..fccf2a8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,6 +35,8 @@ endif()
 
 add_library(ap4 STATIC ${AP4_SOURCES})
 
+add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+
 # Includes
 include_directories(
   ${SOURCE_CORE}
@@ -43,6 +45,14 @@ include_directories(
   ${SOURCE_METADATA}
 )
 
+# AP4 includes
+file(GLOB AP4_INCLUDES
+  ${SOURCE_CODECS}/*.h
+  ${SOURCE_CORE}/*.h
+  ${SOURCE_CRYPTO}/*.h
+  ${SOURCE_METADATA}/*.h
+)
+
 # Apps
 file(GLOB BENTO4_APPS RELATIVE ${SOURCE_ROOT}/Apps ${SOURCE_ROOT}/Apps/*)
 foreach(app ${BENTO4_APPS})
@@ -50,3 +60,13 @@ foreach(app ${BENTO4_APPS})
   add_executable(${binary_name} ${SOURCE_ROOT}/Apps/${app}/${app}.cpp)
   target_link_libraries(${binary_name} ap4)
 endforeach()
+
+# Install targets
+install(TARGETS ap4
+  RUNTIME DESTINATION bin
+  LIBRARY DESTINATION lib
+  ARCHIVE DESTINATION lib
+)
+
+# Install headers
+install(FILES ${AP4_INCLUDES} DESTINATION include)
\ No newline at end of file