cmake conversion #3

已合并
SlavekB 5 年前 将 1 次代码提交从 feat/cmakeConv 合并至 master
Ghost 评论于 5 年前

I've added a man page taken from your Debian building system.
The download location for kbarcode-2.0.0.pdf has been set to "gentoo.ussg.indiana.edu", this could be change for an other location (wiki) later.

I've added a man page taken from your Debian building system. The download location for kbarcode-2.0.0.pdf has been set to "gentoo.ussg.indiana.edu", this could be change for an other location (wiki) later.
Ghost5 年前 添加了标签 PR/rfc
SlavekB 评审于 5 年前
SlavekB 留下了一条评论
所有者

Please add the build options and adjust the tests as mentioned in the note below.

Please add the build options and adjust the tests as mentioned in the note below.
#### check for headers
check_include_file( "barcode.h" _ENABLE_NATIVE_GNU_BARCODE )
check_include_file( "kjs/interpreter.h" USE_JAVASCRIPT )
SlavekB 评论于 5 年前
所有者

We should define options such as WITH_NATIVE_GNU_BARCODE (OFF by default) and WITH_JAVASCRIPT, and these tests should end by tde_message_fatal if the conditions are not met.

We should define options such as `WITH_NATIVE_GNU_BARCODE` (OFF by default) and `WITH_JAVASCRIPT`, and these tests should end by `tde_message_fatal` if the conditions are not met.
SlavekB 评论于 5 年前
所有者

There are additional issues:

  1. Since TDE includes neither TQt include does not need to be on the usual paths, test for kjs/interpreter.h fails – we need to set CMAKE_REQUIRED_INCLUDES.
  2. Since kjs/interpreter.h is intended for C++, the check_include_file test fails because the build with C fails – we need to use check_include_file_cxx.

This means to add to CMakeLists.txt:

include( CheckIncludeFileCXX    )

And in ConfigureChecks.cmake change test:

if( WITH_JAVASCRIPT )
  tde_save( CMAKE_REQUIRED_INCLUDES )
  list( APPEND CMAKE_REQUIRED_INCLUDES ${TQT_INCLUDE_DIRS} ${TDE_INCLUDE_DIR} )
  check_include_file_cxx( "kjs/interpreter.h" USE_JAVASCRIPT )
  tde_restore( CMAKE_REQUIRED_INCLUDES )
endif( )
There are additional issues: 1. Since TDE includes neither TQt include does not need to be on the usual paths, test for `kjs/interpreter.h` fails – we need to set `CMAKE_REQUIRED_INCLUDES`. 2. Since `kjs/interpreter.h` is intended for C++, the `check_include_file` test fails because the build with C fails – we need to use `check_include_file_cxx`. This means to add to CMakeLists.txt: ``` include( CheckIncludeFileCXX ) ``` And in ConfigureChecks.cmake change test: ``` if( WITH_JAVASCRIPT ) tde_save( CMAKE_REQUIRED_INCLUDES ) list( APPEND CMAKE_REQUIRED_INCLUDES ${TQT_INCLUDE_DIRS} ${TDE_INCLUDE_DIR} ) check_include_file_cxx( "kjs/interpreter.h" USE_JAVASCRIPT ) tde_restore( CMAKE_REQUIRED_INCLUDES ) endif( ) ```
SlavekB 评审于 5 年前
config.h.cmake 已过期
SlavekB 评论于 5 年前
所有者

A little typo in the comment – closing > is one word later.

A little typo in the comment – closing > is one word later.
SlavekB 评审于 5 年前
SlavekB 留下了一条评论
所有者

Sorry, but there are some new shortcomings – see comments.

Sorry, but there are some new shortcomings – see comments.
CMakeLists.txt 已过期
option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
option( WITH_NATIVE_GNU_BARCODE "Enable GNU Barcode" OFF )
option( WITH_JAVASCRIPT "Enable Javascript" OFF )
SlavekB 评论于 5 年前
所有者

These are WITH_… options – they belong to the section ##### optional stuff. For WITH_JAVASCRIPT please use default value ${WITH_ALL_OPTIONS}.

These are `WITH_…` options – they belong to the section `##### optional stuff`. For `WITH_JAVASCRIPT` please use default value `${WITH_ALL_OPTIONS}`.
list( APPEND CMAKE_REQUIRED_INCLUDES ${TQT_INCLUDE_DIRS} ${TDE_INCLUDE_DIR} )
check_include_file_cxx( "kjs/interpreter.h" HAVE_JAVASCRIPT )
if( HAVE_JAVASCRIPT )
set( USE_JAVASCRIPT 1 )
SlavekB 评论于 5 年前
所有者

Here it would be good to add also set( NO_KJS_EMBED 1 ).

Here it would be good to add also `set( NO_KJS_EMBED 1 )`.
endif( HAVE_JAVASCRIPT )
else()
set( USE_JAVASCRIPT false )
tde_restore( CMAKE_REQUIRED_INCLUDES )
SlavekB 评论于 5 年前
所有者

This tde_restore is misplaced – it belongs before else( )

This `tde_restore` is misplaced – it belongs before `else( )`
config.h.cmake 已过期
#cmakedefine _ENABLE_NATIVE_GNU_BARCODE @_ENABLE_NATIVE_GNU_BARCODE@
/* Define to 1 if you have <kjs/interpreter.h> header file. */
#cmakedefine USE_JAVASCRIPT @USE_JAVASCRIPT@
SlavekB 评论于 5 年前
所有者

Here, #cmakedefine NO_KJS_EMBED should also be set.

Here, `#cmakedefine NO_KJS_EMBED` should also be set.
SlavekB 评论于 5 年前
所有者

Finished little things:

  1. Rebased to current HEAD.
  2. Fixed shortcomings in patch for cmake options.
  3. Added patch for automake options.
  4. Added patch for ascii cast.

Everything seems to be ready for merge.

Finished little things: 1. Rebased to current HEAD. 2. Fixed shortcomings in patch for cmake options. 3. Added patch for automake options. 4. Added patch for ascii cast. Everything seems to be ready for merge.
SlavekB5 年前 删除了标签 PR/rfc
SlavekB5 年前 批准此合并请求
SlavekB 留下了一条评论
所有者

Everything seems to be ready for merge.

Everything seems to be ready for merge.
SlavekB5 年前 关闭此合并请求
SlavekB5 年前 删除了分支 feat/cmakeConv
SlavekB5 年前 添加了里程碑 R14.0.6 release
该合并请求已作为 20a84daca2 被合并。
登录 并参与到对话中。
无审核者
未选择里程碑
未指派成员
2 名参与者
通知
到期时间

未设置到期时间。

依赖工单

没有设置依赖项。

参考:TDE/kbarcode#3
正在加载...
这个人很懒,什么都没留下。