Compare commits
62 commits
mia
...
try-travis
Author | SHA1 | Date | |
---|---|---|---|
|
6702556776 | ||
|
bf28e7efc3 | ||
|
c2c44f1ad2 | ||
|
5dd201bc2d | ||
|
3663d118b6 | ||
|
60a722db31 | ||
|
d65643ddee | ||
|
fbca222295 | ||
|
3225ae39f4 | ||
|
888be0607f | ||
|
4200b85fb4 | ||
|
0b8b286767 | ||
|
139132a964 | ||
|
4a3689d6e7 | ||
|
248e69a9b6 | ||
|
46474e0319 | ||
|
50544cf749 | ||
|
e9a68f22b9 | ||
|
d6ddea0f65 | ||
|
2bbed6c5a0 | ||
|
592250eeaa | ||
|
8f40ca44ce | ||
|
f776db2d2b | ||
|
f9ffc46bf6 | ||
|
019e68147e | ||
|
f733297499 | ||
|
4c6d370d51 | ||
|
b7c640d061 | ||
|
2c06f03f5b | ||
|
1819fc8d8b | ||
|
ba54e8d12f | ||
|
c76e410d30 | ||
|
bb2cfb1fcd | ||
|
9abcc03202 | ||
|
837d5a41d7 | ||
|
875456c803 | ||
|
9ddecfdd46 | ||
|
70f27eae4b | ||
|
8d2ef3fca7 | ||
|
48869ae0ad | ||
|
b00285cf71 | ||
|
c6c9e05406 | ||
|
fc1a78aeca | ||
|
38bb1790ab | ||
|
fff08c4650 | ||
|
163d57d6a2 | ||
|
6266867586 | ||
|
4431f678ce | ||
|
419386aadd | ||
|
c4cce28766 | ||
|
1ae2f60b9a | ||
|
b6eebcd7ef | ||
|
bf55264e6d | ||
|
34575a9786 | ||
|
69310d40ae | ||
|
657d9d5149 | ||
|
043a45cf91 | ||
|
ad15c53fb1 | ||
|
841a35a6fd | ||
|
ee7dc6af4e | ||
|
77da2436c5 | ||
|
7be2325629 |
117 changed files with 2199 additions and 1175 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -5,6 +5,7 @@
|
|||
*.bz2
|
||||
*.cache
|
||||
*.dep
|
||||
*.db
|
||||
*.dll
|
||||
*.dmg
|
||||
*.exe
|
||||
|
@ -14,6 +15,7 @@
|
|||
*.ilk
|
||||
*.log
|
||||
*.manifest
|
||||
!src/dpi_aware.manifest
|
||||
*.mkv
|
||||
*.mo
|
||||
*.ncb
|
||||
|
@ -86,3 +88,4 @@ vendor/luajit/src/lj_vm.s
|
|||
vendor/luajit/src/luajit
|
||||
|
||||
.nuget
|
||||
.vs
|
||||
|
|
84
.travis.yml
84
.travis.yml
|
@ -1,5 +1,5 @@
|
|||
sudo: required
|
||||
dist: trusty
|
||||
dist: bionic
|
||||
language: cpp
|
||||
|
||||
git:
|
||||
|
@ -8,58 +8,62 @@ git:
|
|||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: 'deb https://apt.kitware.com/ubuntu/ xenial main'
|
||||
key_url: 'https://apt.kitware.com/keys/kitware-archive-latest.asc'
|
||||
packages:
|
||||
- libasound2-dev
|
||||
- libfftw3-dev
|
||||
- libhunspell-dev
|
||||
- yasm
|
||||
- libfribidi-dev
|
||||
- libass-dev
|
||||
- libicu-dev
|
||||
- luarocks
|
||||
- g++-5
|
||||
- cmake
|
||||
- build-essential
|
||||
- libboost-all-dev
|
||||
- libffms2-dev
|
||||
- libfontconfig1-dev
|
||||
- libalut-dev
|
||||
- libuchardet-dev
|
||||
- libwxgtk3.0-dev
|
||||
- portaudio19-dev
|
||||
- libpulse-dev
|
||||
- luajit
|
||||
- libluajit-5.1-dev
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- compiler: gcc
|
||||
env: BOOST_VERSION=55
|
||||
- compiler: gcc
|
||||
env: BOOST_VERSION=60
|
||||
before_install:
|
||||
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5 --slave /usr/bin/gcov gcov /usr/bin/gcov-5
|
||||
env:
|
||||
- {}
|
||||
- BUILD_SUIT=autotools
|
||||
- BUILD_SUIT=autotools CONFIG_FLAGS="--with-system-luajit agi_cv_luajit_is_52=yes"
|
||||
|
||||
install:
|
||||
# Can't install these via the apt addon due to the whitelist
|
||||
- sudo apt-get install -y -qq libffms2-dev libwxgtk3.0-dev libuchardet-dev
|
||||
|
||||
- sudo pip install cpp-coveralls
|
||||
- sudo luarocks install busted > /dev/null
|
||||
- sudo luarocks install moonscript > /dev/null
|
||||
- sudo luarocks install uuid > /dev/null
|
||||
|
||||
- git submodule --quiet init
|
||||
- git submodule --quiet update vendor/googletest
|
||||
|
||||
- cd vendor
|
||||
- rm -rf boost
|
||||
- wget http://sourceforge.net/projects/boost/files/boost/1.${BOOST_VERSION}.0/boost_1_${BOOST_VERSION}_0.tar.bz2/download
|
||||
- tar xjf download
|
||||
- mv boost_1_${BOOST_VERSION}_0 boost
|
||||
- cd boost
|
||||
- ./bootstrap.sh
|
||||
- ./b2 -j3 -layout=system threading=multi cxxflags=-std=c++11 link=shared variant=release --without-python --without-iostreams --without-serialization --without-graph --without-log --without-math --without-signals --without-test --without-wave --without-mpi --without-program_options --without-graph_parallel --without-context --without-coroutine --without-random --without-timer --without-date_time
|
||||
- cd ../..
|
||||
- sudo luarocks install busted > /dev/null
|
||||
- sudo luarocks install moonscript > /dev/null
|
||||
- sudo luarocks install uuid > /dev/null
|
||||
# Remove the CMake provided by travis
|
||||
- sudo rm -rf /usr/local/cmake*
|
||||
- if [ "$BUILD_SUIT" = "autotools" ]; then
|
||||
sudo pip install -U cpp-coveralls;
|
||||
git submodule --quiet init;
|
||||
git submodule --quiet update vendor/googletest;
|
||||
fi
|
||||
|
||||
script:
|
||||
- export CPATH=$(pwd)/vendor/boost
|
||||
- export LD_LIBRARY_PATH=$(pwd)/vendor/boost/stage/lib:$LD_LIBRARY_PATH
|
||||
- export CPPFLAGS="-fprofile-arcs -ftest-coverage"
|
||||
- export LIBS="-lgcov"
|
||||
- autoreconf -if
|
||||
- ./configure BOOST_LDFLAGS="-L$(pwd)/vendor/boost/stage/lib" --enable-debug || cat config.log
|
||||
- make -j3 all test
|
||||
- coveralls --exclude vendor --exclude src --exclude build --exclude tools --exclude libaegisub/windows > /dev/null
|
||||
- if [ "$BUILD_SUIT" = "autotools" ]; then
|
||||
export CPPFLAGS="-fprofile-arcs -ftest-coverage";
|
||||
export LIBS="-lgcov";
|
||||
./autogen.sh;
|
||||
./configure --enable-debug ${CONFIG_FLAGS} || cat config.log;
|
||||
make -j2;
|
||||
make test || travis_terminate 1;
|
||||
coveralls --exclude vendor --exclude src --exclude build --exclude tools --exclude libaegisub/windows > /dev/null;
|
||||
else
|
||||
./build/version.sh .;
|
||||
mkdir build-dir;
|
||||
cd build-dir;
|
||||
cmake -DCMAKE_CXX_FLAGS='-Wall -Wextra -Wno-unused-parameter -pedantic' ..;
|
||||
make -j2;
|
||||
fi
|
||||
|
||||
notifications:
|
||||
email:
|
||||
|
|
446
CMakeLists.txt
Normal file
446
CMakeLists.txt
Normal file
|
@ -0,0 +1,446 @@
|
|||
cmake_minimum_required(VERSION 3.14)
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
|
||||
project(Aegisub)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
||||
|
||||
include_directories("build")
|
||||
include_directories("libaegisub/include")
|
||||
|
||||
add_library(libaegisub STATIC
|
||||
libaegisub/common/parser.cpp
|
||||
libaegisub/ass/dialogue_parser.cpp
|
||||
libaegisub/ass/time.cpp
|
||||
libaegisub/ass/uuencode.cpp
|
||||
libaegisub/audio/provider.cpp
|
||||
libaegisub/audio/provider_convert.cpp
|
||||
libaegisub/audio/provider_dummy.cpp
|
||||
libaegisub/audio/provider_hd.cpp
|
||||
libaegisub/audio/provider_lock.cpp
|
||||
libaegisub/audio/provider_pcm.cpp
|
||||
libaegisub/audio/provider_ram.cpp
|
||||
libaegisub/common/cajun/elements.cpp
|
||||
libaegisub/common/cajun/reader.cpp
|
||||
libaegisub/common/cajun/writer.cpp
|
||||
libaegisub/lua/modules/lfs.cpp
|
||||
libaegisub/lua/modules/re.cpp
|
||||
libaegisub/lua/modules/unicode.cpp
|
||||
libaegisub/lua/modules/lpeg.c
|
||||
libaegisub/lua/modules.cpp
|
||||
libaegisub/lua/script_reader.cpp
|
||||
libaegisub/lua/utils.cpp
|
||||
libaegisub/common/calltip_provider.cpp
|
||||
libaegisub/common/character_count.cpp
|
||||
libaegisub/common/charset.cpp
|
||||
libaegisub/common/charset_6937.cpp
|
||||
libaegisub/common/charset_conv.cpp
|
||||
libaegisub/common/color.cpp
|
||||
libaegisub/common/file_mapping.cpp
|
||||
libaegisub/common/format.cpp
|
||||
libaegisub/common/fs.cpp
|
||||
libaegisub/common/hotkey.cpp
|
||||
libaegisub/common/io.cpp
|
||||
libaegisub/common/json.cpp
|
||||
libaegisub/common/kana_table.cpp
|
||||
libaegisub/common/karaoke_matcher.cpp
|
||||
libaegisub/common/keyframe.cpp
|
||||
libaegisub/common/line_iterator.cpp
|
||||
libaegisub/common/log.cpp
|
||||
libaegisub/common/mru.cpp
|
||||
libaegisub/common/option.cpp
|
||||
libaegisub/common/option_value.cpp
|
||||
libaegisub/common/path.cpp
|
||||
libaegisub/common/thesaurus.cpp
|
||||
libaegisub/common/util.cpp
|
||||
libaegisub/common/vfr.cpp
|
||||
libaegisub/common/ycbcr_conv.cpp
|
||||
libaegisub/common/dispatch.cpp
|
||||
)
|
||||
if (UNIX)
|
||||
target_sources(libaegisub PRIVATE
|
||||
libaegisub/unix/access.cpp
|
||||
libaegisub/unix/fs.cpp
|
||||
libaegisub/unix/log.cpp
|
||||
libaegisub/unix/path.cpp
|
||||
libaegisub/unix/util.cpp
|
||||
)
|
||||
elseif(WIN32)
|
||||
target_sources(libaegisub PRIVATE
|
||||
libaegisub/windows/access.cpp
|
||||
libaegisub/windows/charset_conv_win.cpp
|
||||
libaegisub/windows/fs.cpp
|
||||
libaegisub/windows/lagi_pre.cpp
|
||||
libaegisub/windows/log_win.cpp
|
||||
libaegisub/windows/path_win.cpp
|
||||
libaegisub/windows/util_win.cpp
|
||||
)
|
||||
endif(UNIX)
|
||||
SET_TARGET_PROPERTIES(libaegisub PROPERTIES PREFIX "")
|
||||
target_compile_definitions(libaegisub PRIVATE CMAKE_BUILD)
|
||||
|
||||
find_package(LuaJIT REQUIRED)
|
||||
target_include_directories(libaegisub PRIVATE ${LUAJIT_INCLUDE_DIR})
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${PROJECT_SOURCE_DIR}/src/libresrc/default_config.cpp ${PROJECT_SOURCE_DIR}/src/libresrc/default_config.h
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/src/libresrc/default_config_win.json ${PROJECT_SOURCE_DIR}/src/libresrc/default_config_platform.json
|
||||
COMMAND ${LUAJIT_EXECUTABLE} ../../tools/respack.lua manifest.respack default_config.cpp default_config.h
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src/libresrc
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${PROJECT_SOURCE_DIR}/src/libresrc/bitmap.cpp ${PROJECT_SOURCE_DIR}/src/libresrc/bitmap.h
|
||||
COMMAND ${LUAJIT_EXECUTABLE} ../../tools/respack.lua manifest.respack ../libresrc/bitmap.cpp ../libresrc/bitmap.h
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src/bitmaps
|
||||
)
|
||||
|
||||
add_library(resrc STATIC
|
||||
src/libresrc/bitmap.cpp
|
||||
src/libresrc/default_config.cpp
|
||||
src/libresrc/libresrc.cpp
|
||||
)
|
||||
|
||||
add_library(csri STATIC
|
||||
vendor/csri/lib/list.c
|
||||
vendor/csri/lib/wrap.c
|
||||
vendor/csri/subhelp/logging.c
|
||||
)
|
||||
target_include_directories(csri PRIVATE "vendor/csri/include")
|
||||
IF (WIN32)
|
||||
target_include_directories(csri PRIVATE "vendor/csri/lib/win32")
|
||||
target_sources(csri PRIVATE vendor/csri/lib/win32/enumerate.c)
|
||||
ELSE()
|
||||
target_include_directories(csri PRIVATE "vendor/csri/lib/posix")
|
||||
target_sources(csri PRIVATE vendor/csri/lib/posix/enumerate.c)
|
||||
ENDIF()
|
||||
|
||||
add_executable(Aegisub WIN32
|
||||
src/command/app.cpp
|
||||
src/command/audio.cpp
|
||||
src/command/automation.cpp
|
||||
src/command/command.cpp
|
||||
src/command/edit.cpp
|
||||
src/command/grid.cpp
|
||||
src/command/help.cpp
|
||||
src/command/keyframe.cpp
|
||||
src/command/recent.cpp
|
||||
src/command/subtitle.cpp
|
||||
src/command/time.cpp
|
||||
src/command/timecode.cpp
|
||||
src/command/tool.cpp
|
||||
src/command/video.cpp
|
||||
src/command/vis_tool.cpp
|
||||
src/dialog_about.cpp
|
||||
src/dialog_align.cpp
|
||||
src/dialog_attachments.cpp
|
||||
src/dialog_automation.cpp
|
||||
src/dialog_autosave.cpp
|
||||
src/dialog_colorpicker.cpp
|
||||
src/dialog_detached_video.cpp
|
||||
src/dialog_dummy_video.cpp
|
||||
src/dialog_export.cpp
|
||||
src/dialog_export_ebu3264.cpp
|
||||
src/dialog_fonts_collector.cpp
|
||||
src/dialog_jumpto.cpp
|
||||
src/dialog_kara_timing_copy.cpp
|
||||
src/dialog_log.cpp
|
||||
src/dialog_paste_over.cpp
|
||||
src/dialog_progress.cpp
|
||||
src/dialog_properties.cpp
|
||||
src/dialog_resample.cpp
|
||||
src/dialog_search_replace.cpp
|
||||
src/dialog_selected_choices.cpp
|
||||
src/dialog_selection.cpp
|
||||
src/dialog_shift_times.cpp
|
||||
src/dialog_spellchecker.cpp
|
||||
src/dialog_style_editor.cpp
|
||||
src/dialog_style_manager.cpp
|
||||
src/dialog_styling_assistant.cpp
|
||||
src/dialog_text_import.cpp
|
||||
src/dialog_timing_processor.cpp
|
||||
src/dialog_translation.cpp
|
||||
src/dialog_version_check.cpp
|
||||
src/dialog_video_details.cpp
|
||||
src/dialog_video_properties.cpp
|
||||
src/subtitle_format.cpp
|
||||
src/subtitle_format_ass.cpp
|
||||
src/subtitle_format_ebu3264.cpp
|
||||
src/subtitle_format_encore.cpp
|
||||
src/subtitle_format_microdvd.cpp
|
||||
src/subtitle_format_mkv.cpp
|
||||
src/subtitle_format_srt.cpp
|
||||
src/subtitle_format_ssa.cpp
|
||||
src/subtitle_format_transtation.cpp
|
||||
src/subtitle_format_ttxt.cpp
|
||||
src/subtitle_format_txt.cpp
|
||||
src/visual_tool.cpp
|
||||
src/visual_tool_clip.cpp
|
||||
src/visual_tool_cross.cpp
|
||||
src/visual_tool_drag.cpp
|
||||
src/visual_tool_rotatexy.cpp
|
||||
src/visual_tool_rotatez.cpp
|
||||
src/visual_tool_scale.cpp
|
||||
src/visual_tool_vector_clip.cpp
|
||||
src/MatroskaParser.c
|
||||
src/aegisublocale.cpp
|
||||
src/ass_attachment.cpp
|
||||
src/ass_dialogue.cpp
|
||||
src/ass_entry.cpp
|
||||
src/ass_export_filter.cpp
|
||||
src/ass_exporter.cpp
|
||||
src/ass_file.cpp
|
||||
src/ass_karaoke.cpp
|
||||
src/ass_override.cpp
|
||||
src/ass_parser.cpp
|
||||
src/ass_style.cpp
|
||||
src/ass_style_storage.cpp
|
||||
src/async_video_provider.cpp
|
||||
src/audio_box.cpp
|
||||
src/audio_colorscheme.cpp
|
||||
src/audio_controller.cpp
|
||||
src/audio_display.cpp
|
||||
src/audio_karaoke.cpp
|
||||
src/audio_marker.cpp
|
||||
src/audio_player.cpp
|
||||
src/audio_provider_factory.cpp
|
||||
src/audio_renderer.cpp
|
||||
src/audio_renderer_spectrum.cpp
|
||||
src/audio_renderer_waveform.cpp
|
||||
src/audio_timing_dialogue.cpp
|
||||
src/audio_timing_karaoke.cpp
|
||||
src/auto4_base.cpp
|
||||
src/auto4_lua.cpp
|
||||
src/auto4_lua_assfile.cpp
|
||||
src/auto4_lua_dialog.cpp
|
||||
src/auto4_lua_progresssink.cpp
|
||||
src/base_grid.cpp
|
||||
src/charset_detect.cpp
|
||||
src/colorspace.cpp
|
||||
src/colour_button.cpp
|
||||
src/compat.cpp
|
||||
src/context.cpp
|
||||
src/export_fixstyle.cpp
|
||||
src/export_framerate.cpp
|
||||
src/fft.cpp
|
||||
src/font_file_lister.cpp
|
||||
src/frame_main.cpp
|
||||
src/gl_text.cpp
|
||||
src/gl_wrap.cpp
|
||||
src/grid_column.cpp
|
||||
src/help_button.cpp
|
||||
src/hotkey.cpp
|
||||
src/hotkey_data_view_model.cpp
|
||||
src/image_position_picker.cpp
|
||||
src/initial_line_state.cpp
|
||||
src/main.cpp
|
||||
src/menu.cpp
|
||||
src/mkv_wrap.cpp
|
||||
src/pen.cpp
|
||||
src/persist_location.cpp
|
||||
src/preferences.cpp
|
||||
src/preferences_base.cpp
|
||||
src/project.cpp
|
||||
src/resolution_resampler.cpp
|
||||
src/search_replace_engine.cpp
|
||||
src/selection_controller.cpp
|
||||
src/spellchecker.cpp
|
||||
src/spline.cpp
|
||||
src/spline_curve.cpp
|
||||
src/string_codec.cpp
|
||||
src/subs_controller.cpp
|
||||
src/subs_edit_box.cpp
|
||||
src/subs_edit_ctrl.cpp
|
||||
src/subs_preview.cpp
|
||||
src/subtitles_provider.cpp
|
||||
src/subtitles_provider_libass.cpp
|
||||
src/text_file_reader.cpp
|
||||
src/text_file_writer.cpp
|
||||
src/text_selection_controller.cpp
|
||||
src/thesaurus.cpp
|
||||
src/timeedit_ctrl.cpp
|
||||
src/toggle_bitmap.cpp
|
||||
src/toolbar.cpp
|
||||
src/tooltip_manager.cpp
|
||||
src/utils.cpp
|
||||
src/validators.cpp
|
||||
src/vector2d.cpp
|
||||
src/version.cpp
|
||||
src/video_box.cpp
|
||||
src/video_controller.cpp
|
||||
src/video_display.cpp
|
||||
src/video_frame.cpp
|
||||
src/video_out_gl.cpp
|
||||
src/video_provider_cache.cpp
|
||||
src/video_provider_dummy.cpp
|
||||
src/video_provider_manager.cpp
|
||||
src/video_provider_yuv4mpeg.cpp
|
||||
src/video_slider.cpp
|
||||
src/visual_feature.cpp
|
||||
)
|
||||
target_include_directories(Aegisub PRIVATE ${LUAJIT_INCLUDE_DIR})
|
||||
target_link_libraries(Aegisub ${CMAKE_DL_LIBS} libaegisub ${LUAJIT_LIBRARIES} resrc csri)
|
||||
target_compile_definitions(Aegisub PRIVATE CMAKE_BUILD)
|
||||
|
||||
if (MSVC)
|
||||
set_target_properties(libaegisub PROPERTIES COMPILE_FLAGS "/Yu${PROJECT_SOURCE_DIR}/libaegisub/lagi_pre.h" COMPILE_FLAGS "/FI${PROJECT_SOURCE_DIR}/libaegisub/lagi_pre.h")
|
||||
else(MSVC)
|
||||
target_compile_options(libaegisub PRIVATE -include "${PROJECT_SOURCE_DIR}/libaegisub/lagi_pre.h")
|
||||
endif(MSVC)
|
||||
|
||||
set_property(
|
||||
SOURCE libaegisub/unix/path.cpp
|
||||
PROPERTY COMPILE_DEFINITIONS
|
||||
P_DATA="${CMAKE_INSTALL_PREFIX}/share/aegisub/"
|
||||
)
|
||||
|
||||
if (MSVC)
|
||||
add_definitions("-DNOMINMAX -MP -DINITGUID")
|
||||
set_target_properties(Aegisub PROPERTIES COMPILE_FLAGS "/Yu${PROJECT_SOURCE_DIR}/src/agi_pre.h" COMPILE_FLAGS "/FI${PROJECT_SOURCE_DIR}/src/agi_pre.h")
|
||||
target_link_libraries (Aegisub Usp10)
|
||||
#target_sources(Aegisub PRIVATE src/res/res.rc src/res/strings.rc src/crash_writer_minidump.cpp)
|
||||
target_sources(Aegisub PRIVATE src/res/res.rc src/res/strings.rc src/crash_writer.cpp src/dpi_aware.manifest)
|
||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT Aegisub)
|
||||
else(MSVC)
|
||||
target_sources(Aegisub PRIVATE src/crash_writer.cpp)
|
||||
target_compile_options(Aegisub PRIVATE -include "${PROJECT_SOURCE_DIR}/src/agi_pre.h")
|
||||
target_link_libraries(Aegisub dl)
|
||||
endif(MSVC)
|
||||
|
||||
if (WIN32)
|
||||
target_sources(Aegisub PRIVATE src/font_file_lister_gdi.cpp)
|
||||
else (WIN32)
|
||||
find_package(Fontconfig REQUIRED)
|
||||
target_link_libraries (Aegisub ${Fontconfig_LIBRARIES})
|
||||
target_sources(Aegisub PRIVATE src/font_file_lister_fontconfig.cpp)
|
||||
set_property(SOURCE src/font_file_lister_fontconfig.cpp PROPERTY INCLUDE_DIRECTORIES "${Fontconfig_INCLUDE_DIRS}")
|
||||
endif (WIN32)
|
||||
|
||||
find_package(ass REQUIRED)
|
||||
include_directories(${ass_INCLUDE_DIRS})
|
||||
target_link_libraries (Aegisub ${ass_LIBRARIES})
|
||||
|
||||
find_package(Boost REQUIRED chrono filesystem locale regex system thread)
|
||||
include_directories(${Boost_INCLUDE_DIRS})
|
||||
target_link_directories(Aegisub PRIVATE ${Boost_LIBRARY_DIRS})
|
||||
target_link_libraries(Aegisub ${Boost_LIBRARIES})
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
include_directories(${OPENGL_INCLUDE_DIR})
|
||||
target_link_libraries (Aegisub ${OPENGL_LIBRARIES})
|
||||
|
||||
find_package(Iconv REQUIRED)
|
||||
include_directories(${Iconv_INCLUDE_DIRS})
|
||||
target_link_libraries (Aegisub ${Iconv_LIBRARIES})
|
||||
add_definitions("-DHAVE_ICONV")
|
||||
if (NOT Iconv_IS_BUILT_IN)
|
||||
set_property(
|
||||
SOURCE libaegisub/common/charset_conv.cpp
|
||||
PROPERTY COMPILE_DEFINITIONS AGI_ICONV_CONST
|
||||
)
|
||||
endif (NOT Iconv_IS_BUILT_IN)
|
||||
|
||||
find_package(ICU REQUIRED uc dt in)
|
||||
include_directories(${ICU_INCLUDE_DIRS})
|
||||
target_link_libraries (Aegisub ${ICU_LIBRARIES})
|
||||
|
||||
find_package(wxWidgets REQUIRED adv base core gl stc xml)
|
||||
include(${wxWidgets_USE_FILE})
|
||||
target_link_libraries(Aegisub ${wxWidgets_LIBRARIES})
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
target_link_libraries (Aegisub ${ZLIB_LIBRARIES})
|
||||
|
||||
find_package(ALSA)
|
||||
if (ALSA_FOUND)
|
||||
include_directories(${ALSA_INCLUDE_DIRS})
|
||||
target_link_libraries (Aegisub ${ALSA_LIBRARIES})
|
||||
add_definitions("-DWITH_ALSA")
|
||||
target_sources(Aegisub PRIVATE src/audio_player_alsa.cpp)
|
||||
endif(ALSA_FOUND)
|
||||
|
||||
find_package(AviSynth)
|
||||
if (AviSynth_FOUND)
|
||||
target_compile_definitions(Aegisub PRIVATE "WITH_AVISYNTH" "AVS_LINKAGE_DLLIMPORT")
|
||||
target_include_directories(Aegisub PRIVATE ${AviSynth_INCLUDE_DIRS})
|
||||
target_link_libraries(Aegisub Vfw32 ${AviSynth_LIBRARIES})
|
||||
target_sources(Aegisub PRIVATE src/audio_provider_avs.cpp src/avisynth_wrap.cpp src/video_provider_avs.cpp)
|
||||
endif (AviSynth_FOUND)
|
||||
|
||||
target_compile_definitions(Aegisub PRIVATE "WITH_CSRI")
|
||||
target_sources(Aegisub PRIVATE src/subtitles_provider_csri.cpp)
|
||||
set_property(SOURCE src/subtitles_provider_csri.cpp PROPERTY INCLUDE_DIRECTORIES "${PROJECT_SOURCE_DIR}/vendor/csri/include")
|
||||
|
||||
if(MSVC)
|
||||
target_link_libraries (Aegisub dsound)
|
||||
add_definitions("-DWITH_DIRECTSOUND")
|
||||
target_sources(Aegisub PRIVATE src/audio_player_dsound.cpp src/audio_player_dsound2.cpp)
|
||||
endif(MSVC)
|
||||
|
||||
find_package(FFMS2)
|
||||
if (FFMS2_FOUND)
|
||||
include_directories(${FFMS2_INCLUDE_DIRS})
|
||||
target_link_libraries (Aegisub ${FFMS2_LIBRARIES})
|
||||
add_definitions("-DWITH_FFMS2")
|
||||
target_sources(Aegisub PRIVATE src/audio_provider_ffmpegsource.cpp src/ffmpegsource_common.cpp src/video_provider_ffmpegsource.cpp)
|
||||
endif(FFMS2_FOUND)
|
||||
|
||||
find_package(FFTW)
|
||||
if (FFTW_FOUND)
|
||||
include_directories(${FFTW_INCLUDES})
|
||||
target_link_libraries (Aegisub ${FFTW_LIBRARIES})
|
||||
add_definitions("-DWITH_FFTW3")
|
||||
endif(FFTW_FOUND)
|
||||
|
||||
find_package(Hunspell)
|
||||
if (HUNSPELL_FOUND)
|
||||
include_directories(${HUNSPELL_INCLUDE_DIR})
|
||||
target_link_libraries (Aegisub ${HUNSPELL_LIBRARIES})
|
||||
add_definitions("-DWITH_HUNSPELL")
|
||||
target_sources(Aegisub PRIVATE src/spellchecker_hunspell.cpp)
|
||||
endif (HUNSPELL_FOUND)
|
||||
|
||||
find_package(PulseAudio)
|
||||
if (PULSEAUDIO_FOUND)
|
||||
target_compile_definitions(Aegisub PRIVATE "WITH_LIBPULSE")
|
||||
target_include_directories(Aegisub PRIVATE ${PULSEAUDIO_INCLUDE_DIR})
|
||||
target_link_libraries (Aegisub ${PULSEAUDIO_LIBRARY})
|
||||
target_sources(Aegisub PRIVATE src/audio_player_pulse.cpp)
|
||||
endif(PULSEAUDIO_FOUND)
|
||||
|
||||
find_package(OpenAL)
|
||||
if (OPENAL_FOUND)
|
||||
include_directories(${OPENAL_INCLUDE_DIR})
|
||||
target_link_libraries (Aegisub ${OPENAL_LIBRARY})
|
||||
add_definitions("-DWITH_OPENAL")
|
||||
target_sources(Aegisub PRIVATE src/audio_player_openal.cpp)
|
||||
endif(OPENAL_FOUND)
|
||||
|
||||
#ifdef WITH_OSS
|
||||
#ifdef WITH_PORTAUDIO
|
||||
#ifdef WITH_STARTUPLOG
|
||||
|
||||
find_package(uchardet)
|
||||
if (uchardet_FOUND)
|
||||
include_directories(${uchardet_INCLUDE_DIRS})
|
||||
target_link_libraries (Aegisub ${uchardet_LIBRARIES})
|
||||
add_definitions("-DWITH_UCHARDET")
|
||||
endif(uchardet_FOUND)
|
||||
|
||||
#ifdef WITH_UPDATE_CHECKER
|
||||
|
||||
if (NOT WIN32)
|
||||
set(AEGISUB_COMMAND "aegisub" CACHE STRING "The executable name of Aegisub")
|
||||
set_target_properties(Aegisub PROPERTIES OUTPUT_NAME aegisub)
|
||||
configure_file("packages/desktop/aegisub.desktop.template.cmake.in" "aegisub.desktop" @ONLY)
|
||||
install(FILES "${CMAKE_BINARY_DIR}/aegisub.desktop" DESTINATION "share/applications")
|
||||
install(FILES "packages/desktop/16x16.png" DESTINATION "share/icons/hicolor/16x16/apps" RENAME aegisub.png)
|
||||
install(FILES "packages/desktop/22x22.png" DESTINATION "share/icons/hicolor/22x22/apps" RENAME aegisub.png)
|
||||
install(FILES "packages/desktop/24x24.png" DESTINATION "share/icons/hicolor/24x24/apps" RENAME aegisub.png)
|
||||
install(FILES "packages/desktop/32x32.png" DESTINATION "share/icons/hicolor/32x32/apps" RENAME aegisub.png)
|
||||
install(FILES "packages/desktop/48x48.png" DESTINATION "share/icons/hicolor/48x48/apps" RENAME aegisub.png)
|
||||
install(FILES "packages/desktop/64x64.png" DESTINATION "share/icons/hicolor/64x64/apps" RENAME aegisub.png)
|
||||
install(FILES "packages/desktop/scalable.svg" DESTINATION "share/icons/hicolor/scalable/apps" RENAME aegisub.svg)
|
||||
endif (NOT WIN32)
|
||||
install (TARGETS Aegisub DESTINATION bin)
|
95
README.md
95
README.md
|
@ -1,85 +1,40 @@
|
|||
[![Build Status](https://travis-ci.org/wangqr/Aegisub.svg?branch=dev)](https://travis-ci.org/wangqr/Aegisub)
|
||||
|
||||
# Aegisub
|
||||
|
||||
For binaries and general information [see the homepage](http://www.aegisub.org).
|
||||
|
||||
The bug tracker can be found at http://devel.aegisub.org.
|
||||
The bug tracker can be found at https://github.com/Aegisub/Aegisub/issues .
|
||||
|
||||
Support is available on [the forums](http://forum.aegisub.org) or [on IRC](irc://irc.rizon.net/aegisub).
|
||||
Support is available on IRC ( irc://irc.rizon.net/aegisub ).
|
||||
|
||||
## Building Aegisub
|
||||
|
||||
### Windows
|
||||
|
||||
Prerequisites:
|
||||
|
||||
1. Visual Studio 2015 (the free Community edition is good enough)
|
||||
2. The June 2010 DirectX SDK (the final release before DirectSound was dropped)
|
||||
3. [Yasm](http://yasm.tortall.net/) installed to somewhere on your path.
|
||||
|
||||
There are a few optional dependencies:
|
||||
|
||||
1. msgfmt, to build the translations
|
||||
2. WinRAR, to build the portable installer
|
||||
3. InnoSetup, to build the regular installer
|
||||
|
||||
All other dependencies are either stored in the repository or are included as submodules.
|
||||
1. CMake 3.14 or later (or you can use an older version by editing the first line in CMakeLists.txt, and download the missing `cmake/FindFontconfig.cmake` from [here](https://gitlab.kitware.com/cmake/cmake/blob/master/Modules/FindFontconfig.cmake)),
|
||||
2. Any compiling toolchain supported by CMake,
|
||||
3. All required dependencies, namely `libass`, `Boost`(with ICU support), `OpenGL`, `libicu`, `wxWidgets`, `zlib`. Additionally, `libiconv` is required on non-POSIX systems. `fontconfig` is required on non-Windows systems.
|
||||
4. Any optional dependencies, namely `ALSA`, `FFMS2`, `FFTW`, `Hunspell`, `OpenAL`, `uchardet`.
|
||||
|
||||
Building:
|
||||
|
||||
1. Clone Aegisub's repository recursively to fetch it and all submodules: `git clone --recursive git@github.com:Aegisub/Aegisub.git` This will take quite a while and requires about 2.5 GB of disk space.
|
||||
2. Open Aegisub.sln
|
||||
3. Build the BuildTasks project.
|
||||
4. Build the entire solution.
|
||||
|
||||
You should now have a `bin` directory in your Aegisub directory which contains `aegisub32d.exe`, along with a pile of other files.
|
||||
|
||||
The Aegisub installer includes some files not built as part of Aegisub (such as Avisynth and VSFilter), so for a fully functional copy of Aegisub you now need to copy all of the files from an installed copy of Aegisub into your `bin` directory (and don't overwrite any of the files already there).
|
||||
You'll also either need to copy the `automation` directory into the `bin` directory, or edit your automation search paths to include the `automation` directory in the source tree.
|
||||
|
||||
After building the solution once, you'll want to switch to the Debug-MinDep configuration, which skips checking if the dependencies are out of date, as that takes a while.
|
||||
|
||||
### OS X
|
||||
|
||||
A vaguely recent version of Xcode and the corresponding command-line tools are required.
|
||||
Nothing older than Xcode 5 has been tested recently, but it is likely that some later versions of Xcode 4 are good enough.
|
||||
|
||||
For personal usage, you can use homebrew to install almost all of Aegisub's dependencies:
|
||||
|
||||
brew install autoconf ffmpeg freetype gettext ffms2 fftw fribidi libass m4
|
||||
brew install --devel --with-gc64 luajit
|
||||
brew install --HEAD icu4c
|
||||
brew link --force icu4c
|
||||
brew link --force gettext
|
||||
brew install --HEAD --c++11 --with-icu4c boost
|
||||
|
||||
wxWidgets is located in vendor/wxWidgets, and can be built like so:
|
||||
|
||||
CPPFLAGS="$CPPFLAGS -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=1" \
|
||||
./configure --disable-aboutdlg --disable-animatectrl --disable-aui --disable-any \
|
||||
--disable-bannerwindow --disable-base64 --disable-calendar --disable-caret \
|
||||
--disable-cmdline --disable-colourpicker --disable-compat28 --disable-config \
|
||||
--disable-constraints --disable-datepick --disable-dctransform --disable-debugreport \
|
||||
--disable-dialupman --disable-docview --disable-filehistory --disable-finddlg \
|
||||
--disable-fs_archive --disable-fs_inet --disable-fs_zip --disable-fsvolume \
|
||||
--disable-fswatcher --disable-gif --disable-help --disable-html --disable-ipc \
|
||||
--disable-joystick --disable-jpeg --disable-largefile --disable-markup --disable-mdi \
|
||||
--disable-mediactrl --disable-metafiles --disable-miniframe --disable-notifmsg \
|
||||
--disable-numberdlg --disable-pcx --disable-pnm --disable-postscript \
|
||||
--disable-prefseditor --disable-printarch --disable-progressdlg --disable-propgrid \
|
||||
--disable-protocol --disable-protocols --disable-rearrangectrl --disable-ribbon \
|
||||
--disable-richtext --disable-richtooltip --disable-snglinst --disable-sockets \
|
||||
--disable-sockets --disable-sound --disable-splash --disable-splines \
|
||||
--disable-std_iostreams --disable-svg --disable-tarstream --disable-tiff \
|
||||
--disable-tipdlg --disable-tipwindow --disable-url --disable-webkit --disable-webview \
|
||||
--disable-wizarddlg --disable-xrc \
|
||||
--enable-geometry --enable-imaglist --enable-listctrl --enable-stc --with-cocoa \
|
||||
--with-libpng=yes --with-macosx-version-min=10.9 \
|
||||
--with-opengl \
|
||||
--without-libjpeg --without-libtiff --without-regex \
|
||||
&& make
|
||||
|
||||
Once the dependencies are installed, build Aegisub with `autoreconf && ./configure --with-wxdir=/path/to/Aegisub/vendor/wxWidgets && make && make osx-bundle`.
|
||||
`autoreconf` should be skipped if you are building from a source tarball rather than `git`.
|
||||
1. If you decided to build from source:
|
||||
```shell
|
||||
git clone https://github.com/wangqr/Aegisub.git # No --recursive is needed
|
||||
cd Aegisub
|
||||
./build/version.sh . # This will generate build/git_version.h
|
||||
```
|
||||
2. Make an empty directory to hold build outputs:
|
||||
```shell
|
||||
mkdir build-dir
|
||||
```
|
||||
3. Build the project using CMake. Use either cmake-gui, or the command line:
|
||||
```shell
|
||||
cd build-dir
|
||||
cmake ..
|
||||
make
|
||||
```
|
||||
|
||||
## Updating Moonscript
|
||||
|
||||
|
@ -95,4 +50,4 @@ The file is now ready for use, to be placed in `automation/include` within the A
|
|||
## License
|
||||
|
||||
All files in this repository are licensed under various GPL-compatible BSD-style licenses; see LICENCE and the individual source files for more information.
|
||||
The official Windows and OS X builds are GPLv2 due to including fftw3.
|
||||
The official Windows build is GPLv2 due to including fftw3.
|
||||
|
|
|
@ -39,7 +39,7 @@ search = (re, str, start) ->
|
|||
res = regex.search re, str, str\len(), start
|
||||
return unless res != nil
|
||||
first, last = res[0], res[1]
|
||||
ffi.C.free res
|
||||
ffi.gc(res, ffi.C.free)
|
||||
first, last
|
||||
|
||||
replace = (re, replacement, str, max_count) ->
|
||||
|
|
|
@ -40,3 +40,11 @@ Returns: 2 values, all numbers.
|
|||
2. End of the selection, in milliseconds.
|
||||
|
||||
---
|
||||
|
||||
Setting the main frame's status bar text
|
||||
|
||||
function aegisub.set_status_bar_text(text)
|
||||
|
||||
Returns: 0 values
|
||||
|
||||
---
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
<AdditionalLibraryDirectories Condition="'$(Platform)'=='Win32'">$(DXSDK_DIR)\Lib\x86</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories Condition="'$(Platform)'=='x64'">$(DXSDK_DIR)\Lib\x64</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<!-- Update git_version.h -->
|
||||
|
|
19
cmake/FindAviSynth.cmake
Normal file
19
cmake/FindAviSynth.cmake
Normal file
|
@ -0,0 +1,19 @@
|
|||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_AviSynth QUIET AviSynth)
|
||||
find_path(AviSynth_INCLUDE_DIRS
|
||||
NAMES avisynth.h
|
||||
PATHS ${PC_AviSynth_INCLUDE_DIRS}
|
||||
)
|
||||
find_library(AviSynth_LIBRARIES
|
||||
NAMES avisynth
|
||||
PATHS ${PC_AviSynth_LIBRARY_DIRS}
|
||||
)
|
||||
set(AviSynth_VERSION ${PC_AviSynth_VERSION})
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(AviSynth
|
||||
FOUND_VAR AviSynth_FOUND
|
||||
REQUIRED_VARS
|
||||
AviSynth_LIBRARIES
|
||||
AviSynth_INCLUDE_DIRS
|
||||
VERSION_VAR AviSynth_VERSION
|
||||
)
|
19
cmake/FindFFMS2.cmake
Normal file
19
cmake/FindFFMS2.cmake
Normal file
|
@ -0,0 +1,19 @@
|
|||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_FFMS2 QUIET ffms2)
|
||||
find_path(FFMS2_INCLUDE_DIRS
|
||||
NAMES ffms.h ffmscompat.h
|
||||
PATHS ${PC_FFMS2_INCLUDE_DIRS}
|
||||
)
|
||||
find_library(FFMS2_LIBRARIES
|
||||
NAMES ffms2
|
||||
PATHS ${PC_FFMS2_LIBRARY_DIRS}
|
||||
)
|
||||
set(FFMS2_VERSION ${PC_FFMS2_VERSION})
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(FFMS2
|
||||
FOUND_VAR FFMS2_FOUND
|
||||
REQUIRED_VARS
|
||||
FFMS2_LIBRARIES
|
||||
FFMS2_INCLUDE_DIRS
|
||||
VERSION_VAR FFMS2_VERSION
|
||||
)
|
119
cmake/FindFFTW.cmake
Normal file
119
cmake/FindFFTW.cmake
Normal file
|
@ -0,0 +1,119 @@
|
|||
# - Find the FFTW library
|
||||
#
|
||||
# Usage:
|
||||
# find_package(FFTW [REQUIRED] [QUIET] )
|
||||
#
|
||||
# It sets the following variables:
|
||||
# FFTW_FOUND ... true if fftw is found on the system
|
||||
# FFTW_LIBRARIES ... full path to fftw library
|
||||
# FFTW_INCLUDES ... fftw include directory
|
||||
#
|
||||
# The following variables will be checked by the function
|
||||
# FFTW_USE_STATIC_LIBS ... if true, only static libraries are found
|
||||
# FFTW_ROOT ... if set, the libraries are exclusively searched
|
||||
# under this path
|
||||
# FFTW_LIBRARY ... fftw library to use
|
||||
# FFTW_INCLUDE_DIR ... fftw include directory
|
||||
#
|
||||
|
||||
#If environment variable FFTWDIR is specified, it has same effect as FFTW_ROOT
|
||||
if( NOT FFTW_ROOT AND ENV{FFTWDIR} )
|
||||
set( FFTW_ROOT $ENV{FFTWDIR} )
|
||||
endif()
|
||||
|
||||
# Check if we can use PkgConfig
|
||||
find_package(PkgConfig)
|
||||
|
||||
#Determine from PKG
|
||||
if( PKG_CONFIG_FOUND AND NOT FFTW_ROOT )
|
||||
pkg_check_modules( PKG_FFTW QUIET "fftw3" )
|
||||
endif()
|
||||
|
||||
#Check whether to search static or dynamic libs
|
||||
set( CMAKE_FIND_LIBRARY_SUFFIXES_SAV ${CMAKE_FIND_LIBRARY_SUFFIXES} )
|
||||
|
||||
if( ${FFTW_USE_STATIC_LIBS} )
|
||||
set( CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX} )
|
||||
else()
|
||||
set( CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_LIBRARY_SUFFIX} )
|
||||
endif()
|
||||
|
||||
if( FFTW_ROOT )
|
||||
|
||||
#find libs
|
||||
find_library(
|
||||
FFTW_LIB
|
||||
NAMES "fftw3"
|
||||
PATHS ${FFTW_ROOT}
|
||||
PATH_SUFFIXES "lib" "lib64"
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
find_library(
|
||||
FFTWF_LIB
|
||||
NAMES "fftw3f"
|
||||
PATHS ${FFTW_ROOT}
|
||||
PATH_SUFFIXES "lib" "lib64"
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
find_library(
|
||||
FFTWL_LIB
|
||||
NAMES "fftw3l"
|
||||
PATHS ${FFTW_ROOT}
|
||||
PATH_SUFFIXES "lib" "lib64"
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
#find includes
|
||||
find_path(
|
||||
FFTW_INCLUDES
|
||||
NAMES "fftw3.h"
|
||||
PATHS ${FFTW_ROOT}
|
||||
PATH_SUFFIXES "include"
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
else()
|
||||
|
||||
find_library(
|
||||
FFTW_LIB
|
||||
NAMES "fftw3"
|
||||
PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
|
||||
)
|
||||
|
||||
find_library(
|
||||
FFTWF_LIB
|
||||
NAMES "fftw3f"
|
||||
PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
|
||||
)
|
||||
|
||||
|
||||
find_library(
|
||||
FFTWL_LIB
|
||||
NAMES "fftw3l"
|
||||
PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
|
||||
)
|
||||
|
||||
find_path(
|
||||
FFTW_INCLUDES
|
||||
NAMES "fftw3.h"
|
||||
PATHS ${PKG_FFTW_INCLUDE_DIRS} ${INCLUDE_INSTALL_DIR}
|
||||
)
|
||||
|
||||
endif( FFTW_ROOT )
|
||||
|
||||
set(FFTW_LIBRARIES ${FFTW_LIB} ${FFTWF_LIB})
|
||||
|
||||
if(FFTWL_LIB)
|
||||
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTWL_LIB})
|
||||
endif()
|
||||
|
||||
set( CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SAV} )
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(FFTW DEFAULT_MSG
|
||||
FFTW_INCLUDES FFTW_LIBRARIES)
|
||||
|
||||
mark_as_advanced(FFTW_INCLUDES FFTW_LIBRARIES FFTW_LIB FFTWF_LIB FFTWL_LIB)
|
||||
|
57
cmake/FindHunspell.cmake
Normal file
57
cmake/FindHunspell.cmake
Normal file
|
@ -0,0 +1,57 @@
|
|||
# - Try to find Hunspell
|
||||
# Once done this will define
|
||||
#
|
||||
# HUNSPELL_FOUND - system has Hunspell
|
||||
# HUNSPELL_INCLUDE_DIR - the Hunspell include directory
|
||||
# HUNSPELL_LIBRARIES - Link these to use Hunspell
|
||||
#
|
||||
# Redistribution and use of this file is allowed according to the terms of the
|
||||
# MIT license. For details see the file COPYING-CMAKE-MODULES.
|
||||
|
||||
|
||||
if ( HUNSPELL_INCLUDE_DIR AND HUNSPELL_LIBRARIES )
|
||||
# in cache already
|
||||
SET(Hunspell_FIND_QUIETLY TRUE)
|
||||
endif ( HUNSPELL_INCLUDE_DIR AND HUNSPELL_LIBRARIES )
|
||||
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
if( NOT WIN32 )
|
||||
find_package(PkgConfig)
|
||||
|
||||
pkg_check_modules(HUNSPELL_PKG QUIET hunspell)
|
||||
endif( NOT WIN32 )
|
||||
|
||||
FIND_PATH(HUNSPELL_INCLUDE_DIR NAMES hunspell.h
|
||||
PATHS
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
HINTS
|
||||
${HUNSPELL_PKG_INCLUDE_DIRS} # Generated by pkg-config
|
||||
PATH_SUFFIXES hunspell
|
||||
)
|
||||
|
||||
FIND_LIBRARY(HUNSPELL_LIBRARIES NAMES hunspell-1.7 hunspell-1.6 hunspell-1.5 hunspell-1.4 hunspell-1.3 hunspell-1.2 hunspell ${HUNSPELL_PKG_LIBRARIES}
|
||||
PATHS
|
||||
/usr/local
|
||||
/usr
|
||||