cmake conversion #3

マージ済み
SlavekB が 1 個のコミットを feat/cmakeConv から master へマージ 5年前
Ghost5年前 にコメント

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.
Ghost がラベル PR/rfc を追加 5年前
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.
ConfigureChecks.cmake 古い内容
#### check for headers
check_include_file( "barcode.h" _ENABLE_NATIVE_GNU_BARCODE )
check_include_file( "kjs/interpreter.h" USE_JAVASCRIPT )
SlavekB5年前 にコメント
オーナー

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.
SlavekB5年前 にコメント
オーナー

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 古い内容
SlavekB5年前 にコメント
オーナー

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 )
SlavekB5年前 にコメント
オーナー

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}`.
ConfigureChecks.cmake 古い内容
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 )
SlavekB5年前 にコメント
オーナー

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 )`.
ConfigureChecks.cmake 古い内容
endif( HAVE_JAVASCRIPT )
else()
set( USE_JAVASCRIPT false )
tde_restore( CMAKE_REQUIRED_INCLUDES )
SlavekB5年前 にコメント
オーナー

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@
SlavekB5年前 にコメント
オーナー

Here, #cmakedefine NO_KJS_EMBED should also be set.

Here, `#cmakedefine NO_KJS_EMBED` should also be set.
SlavekB5年前 にコメント
オーナー

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.
SlavekB がラベル PR/rfc を除去 5年前
SlavekB が変更を承認 5年前
SlavekB がコメント
オーナー

Everything seems to be ready for merge.

Everything seems to be ready for merge.
SlavekB がプルリクエストをクローズ 5年前
SlavekB がブランチ feat/cmakeConv を削除 5年前
SlavekB がマイルストーン R14.0.6 release に追加 5年前
プルリクエストは 20a84daca2 でマージされています。
サインインしてこの会話に参加。
レビューアなし
マイルストーンなし
担当者なし
2 人の参加者
通知
期日

期日は未設定です。

依存関係

依存関係が設定されていません。

リファレンス: TDE/kbarcode#3
読み込み中…
まだ内容がありません