File tree 2 files changed +32
-15
lines changed
2 files changed +32
-15
lines changed Original file line number Diff line number Diff line change 1
- cmake_minimum_required (VERSION 2.8)
1
+ CMAKE_MINIMUM_REQUIRED (VERSION 2.8)
2
+ PROJECT (assrender)
2
3
3
- project (assrender )
4
+ ADD_SUBDIRECTORY (src )
4
5
5
- find_package (PkgConfig REQUIRED)
6
- pkg_check_modules(LIBASS REQUIRED libass>=0.10.0)
7
- find_package (EXPAT REQUIRED)
8
- find_package (ZLIB REQUIRED)
6
+ IF (MINGW)
7
+ SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -Wl,--add-stdcall-alias" )
8
+ SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wpedantic" )
9
+ SET (CMAKE_SHARED_LINKER_FLAGS_RELEASE "-s" )
10
+ SET (CMAKE_C_FLAGS_RELEASE "-O3" )
11
+ ENDIF ()
9
12
10
- if (CMAKE_COMPILER_IS_GNUCXX)
11
- add_definitions ("-Wall -Wno-comment -pedantic -std=gnu99" )
12
- set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "-s" )
13
- set (CMAKE_C_FLAGS_RELEASE "-O3" )
14
- endif ()
15
-
16
- add_subdirectory (src)
Original file line number Diff line number Diff line change 1
- add_library (assrender SHARED render.c sub.c timecodes.c assrender.c)
2
- target_link_libraries (assrender ${LIBASS_LDFLAGS} ${EXPAT_LIBRARY} ${ZLIB_LIBRARY} avisynth.lib)
1
+ SET (ASSRender_SRC
2
+ assrender.c
3
+ assrender.h
4
+ render.c
5
+ render.h
6
+ sub.c
7
+ sub.h
8
+ timecodes.c
9
+ timecodes.h
10
+ )
11
+
12
+ FIND_PACKAGE (PkgConfig REQUIRED)
13
+ PKG_CHECK_MODULES(LIBASS REQUIRED libass>=0.12.0)
14
+
15
+ ADD_LIBRARY (assrender
16
+ SHARED
17
+ ${ASSRender_SRC}
18
+ )
19
+
20
+ TARGET_LINK_LIBRARIES (assrender
21
+ ${LIBASS_LDFLAGS}
22
+ avisynth.lib
23
+ )
You can’t perform that action at this time.
0 commit comments