Changeset View
Changeset View
Standalone View
Standalone View
3rdparty/ext_frameworks/ki18n.diff
- This file was added.
1 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||||
---|---|---|---|---|---|
2 | index 178117e..497395d 100755 | ||||
3 | --- a/CMakeLists.txt | ||||
4 | +++ b/CMakeLists.txt | ||||
5 | @@ -54,11 +54,11 @@ if(MSVC) | ||||
6 | endif() | ||||
7 | | ||||
8 | add_definitions(-DTRANSLATION_DOMAIN=\"ki18n5\") | ||||
9 | -if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po") | ||||
10 | - ki18n_install(po) | ||||
11 | -endif() | ||||
12 | +#if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po") | ||||
13 | +# ki18n_install(po) | ||||
14 | +#endif() | ||||
15 | add_subdirectory(src) | ||||
16 | -add_subdirectory(autotests) | ||||
17 | +#add_subdirectory(autotests) | ||||
18 | | ||||
19 | # create a Config.cmake and a ConfigVersion.cmake file and install them | ||||
20 | set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5I18n") | ||||
21 | diff --git a/cmake/KF5I18NMacros.cmake b/cmake/KF5I18NMacros.cmake | ||||
22 | index 53ba812..db8ea98 100755 | ||||
23 | --- a/cmake/KF5I18NMacros.cmake | ||||
24 | +++ b/cmake/KF5I18NMacros.cmake | ||||
25 | @@ -25,14 +25,9 @@ | ||||
26 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
27 | # SUCH DAMAGE. | ||||
28 | | ||||
29 | -find_package(Gettext REQUIRED) | ||||
30 | -find_package(PythonInterp REQUIRED) | ||||
31 | - | ||||
32 | -set(_ki18n_pmap_compile_script ${CMAKE_CURRENT_LIST_DIR}/ts-pmap-compile.py) | ||||
33 | -set(_ki18n_uic_script ${CMAKE_CURRENT_LIST_DIR}/kf5i18nuic.cmake) | ||||
34 | - | ||||
35 | #create the implementation files from the ui files and add them to the list of sources | ||||
36 | #usage: KI18N_WRAP_UI(foo_SRCS ${ui_files}) | ||||
37 | +set(_ki18n_uic_script ${CMAKE_CURRENT_LIST_DIR}/kf5i18nuic.cmake) | ||||
38 | macro (KI18N_WRAP_UI _sources ) | ||||
39 | foreach (_current_FILE ${ARGN}) | ||||
40 | | ||||
41 | @@ -57,6 +52,13 @@ macro (KI18N_WRAP_UI _sources ) | ||||
42 | endforeach (_current_FILE) | ||||
43 | endmacro (KI18N_WRAP_UI) | ||||
44 | | ||||
45 | +find_package(Gettext) | ||||
46 | +find_package(PythonInterp) | ||||
47 | + | ||||
48 | +if (Gettext_FOUND AND PythonInterp_FOUND) | ||||
49 | + | ||||
50 | +set(_ki18n_pmap_compile_script ${CMAKE_CURRENT_LIST_DIR}/ts-pmap-compile.py) | ||||
51 | + | ||||
52 | #install the scripts for a given language in the target folder | ||||
53 | #usage: KI18N_INSTALL_TS_FILES("ja" ${scripts_dir}) | ||||
54 | function(KI18N_INSTALL_TS_FILES lang scripts_dir) | ||||
55 | @@ -225,3 +227,7 @@ function(_KI18N_GETTEXT_GET_UNIQUE_TARGET_NAME _name _unique_name) | ||||
56 | set_property(GLOBAL PROPERTY ${propertyName} ${currentCounter} ) | ||||
57 | endfunction() | ||||
58 | # End of CMake copied code #################################################### | ||||
59 | + | ||||
60 | +else() | ||||
61 | + message("Warning: Python and Gettext are needed for some functionality.") | ||||
62 | +endif() # Python and gettext found |