|
Lines 855-860
Link Here
|
| 855 |
set( _storage "_link" ) |
855 |
set( _storage "_link" ) |
| 856 |
endif( "+${_arg}" STREQUAL "+LINK" ) |
856 |
endif( "+${_arg}" STREQUAL "+LINK" ) |
| 857 |
|
857 |
|
|
|
858 |
# found directive "LINK_PRIVATE" |
| 859 |
if( "+${_arg}" STREQUAL "+LINK_PRIVATE" ) |
| 860 |
set( _skip_store 1 ) |
| 861 |
set( _storage "_link_private" ) |
| 862 |
endif( "+${_arg}" STREQUAL "+LINK_PRIVATE" ) |
| 863 |
|
| 858 |
# found directive "DEPENDENCIES" |
864 |
# found directive "DEPENDENCIES" |
| 859 |
if( "+${_arg}" STREQUAL "+DEPENDENCIES" ) |
865 |
if( "+${_arg}" STREQUAL "+DEPENDENCIES" ) |
| 860 |
set( _skip_store 1 ) |
866 |
set( _skip_store 1 ) |
|
Lines 1027-1038
Link Here
|
| 1027 |
target_link_libraries( ${_target} ${_link} ) |
1033 |
target_link_libraries( ${_target} ${_link} ) |
| 1028 |
endif( _embed AND ${CMAKE_VERSION} VERSION_EQUAL "2.8.12.0" ) |
1034 |
endif( _embed AND ${CMAKE_VERSION} VERSION_EQUAL "2.8.12.0" ) |
| 1029 |
endif( ) |
1035 |
endif( ) |
|
|
1036 |
|
| 1030 |
if( _shared_libs ) |
1037 |
if( _shared_libs ) |
| 1031 |
set_target_properties( ${_target} PROPERTIES |
1038 |
set_target_properties( ${_target} PROPERTIES |
| 1032 |
LINK_INTERFACE_LIBRARIES "${_shared_libs}" |
1039 |
LINK_INTERFACE_LIBRARIES "${_shared_libs}" |
| 1033 |
INTERFACE_LINK_LIBRARIES "${_shared_libs}" ) |
1040 |
INTERFACE_LINK_LIBRARIES "${_shared_libs}" ) |
| 1034 |
endif( _shared_libs ) |
1041 |
endif( _shared_libs ) |
| 1035 |
|
1042 |
|
|
|
1043 |
# set private link libraries |
| 1044 |
if( _link_private ) |
| 1045 |
target_link_libraries( ${_target} PRIVATE ${_link_private} ) |
| 1046 |
endif( ) |
| 1047 |
|
| 1036 |
# set dependencies |
1048 |
# set dependencies |
| 1037 |
if( _dependencies ) |
1049 |
if( _dependencies ) |
| 1038 |
add_dependencies( ${_target} ${_dependencies} ) |
1050 |
add_dependencies( ${_target} ${_dependencies} ) |
|
Lines 1874-1881
Link Here
|
| 1874 |
if( DESKTOP_MERGE_MSGFMT ) |
1886 |
if( DESKTOP_MERGE_MSGFMT ) |
| 1875 |
|
1887 |
|
| 1876 |
# create LINGUAS file for msgfmt |
1888 |
# create LINGUAS file for msgfmt |
| 1877 |
string( REPLACE ".po;" "\n" _linguas "${_translations};" ) |
1889 |
string( REPLACE ".po;" " " _linguas "${_translations};" ) |
| 1878 |
file( WRITE ${_po_dir}/LINGUAS "${_linguas}" ) |
|
|
| 1879 |
|
1890 |
|
| 1880 |
# prepare keywords for msgfmt |
1891 |
# prepare keywords for msgfmt |
| 1881 |
set( _keywords_arg "--keyword=" ) |
1892 |
set( _keywords_arg "--keyword=" ) |
|
Lines 1887-1908
Link Here
|
| 1887 |
get_filename_component( _src ${_src} ABSOLUTE ) |
1898 |
get_filename_component( _src ${_src} ABSOLUTE ) |
| 1888 |
add_custom_command( |
1899 |
add_custom_command( |
| 1889 |
OUTPUT ${_basename} |
1900 |
OUTPUT ${_basename} |
|
|
1901 |
COMMAND export LINGUAS="${_linguas}" |
| 1890 |
COMMAND ${MSGFMT_EXECUTABLE} --desktop --template ${_src} -d ${_po_dir} -o ${_basename} ${_keywords_arg} |
1902 |
COMMAND ${MSGFMT_EXECUTABLE} --desktop --template ${_src} -d ${_po_dir} -o ${_basename} ${_keywords_arg} |
|
|
1903 |
COMMAND unset LINGUAS |
| 1891 |
DEPENDS ${_src} |
1904 |
DEPENDS ${_src} |
| 1892 |
) |
1905 |
) |
| 1893 |
|
1906 |
|
| 1894 |
# cleanup LINGUAS file |
|
|
| 1895 |
get_filename_component( _linguas_path "${_po_dir}/LINGUAS" ABSOLUTE ) |
| 1896 |
file( RELATIVE_PATH _linguas_path "${CMAKE_SOURCE_DIR}" "${_linguas_path}" ) |
| 1897 |
string( REPLACE "/" "+" _linguas_cleanup_target "${_linguas_path}-cleanup" ) |
| 1898 |
if( NOT TARGET ${_linguas_cleanup_target} ) |
| 1899 |
add_custom_target( ${_linguas_cleanup_target} ALL |
| 1900 |
COMMAND ${CMAKE_COMMAND} -E remove ${_po_dir}/LINGUAS |
| 1901 |
COMMENT "Cleanup ${_linguas_path} file..." |
| 1902 |
) |
| 1903 |
endif( ) |
| 1904 |
add_dependencies( ${_linguas_cleanup_target} "${_target}" ) |
| 1905 |
|
| 1906 |
else( ) |
1907 |
else( ) |
| 1907 |
|
1908 |
|
| 1908 |
# create template for intltool-merge |
1909 |
# create template for intltool-merge |