-
Notifications
You must be signed in to change notification settings - Fork 4
3rdpartyライブラリの更新 #283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3rdpartyライブラリの更新 #283
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -31,24 +31,22 @@ if( NOT(IOS OR ANDROID) ) | |||||||||||||||||||
| # 注意点: | ||||||||||||||||||||
| # libpngのバージョンは、Unreal EngineのPngImageWrapper.hに記載のバージョンに合わせる必要があります。 | ||||||||||||||||||||
| # そうでないと、UEでパッケージ化したあとexeを起動したときにassertion failedのダイアログが出て強制終了になります。 | ||||||||||||||||||||
| # Unreal Engineの対応バージョンを上げるときには併せてPngImageWrapperで利用のlibpngバージョンを確認し、 | ||||||||||||||||||||
| # libpngのバージョンが上がる場合はlibplateau submoduleのlibpngを新しいバージョンにしたうえで下のpng15_staticの15を{major_ver}{minor_ver}に置き換える必要がありそうです。 | ||||||||||||||||||||
| add_dependencies(plateau libjpeg-turbo png15_static tiff hmm) | ||||||||||||||||||||
| target_link_libraries(plateau PRIVATE ${JPEG_TURBO_LIBRARIES} png15_static tiff hmm) | ||||||||||||||||||||
| add_dependencies(plateau libjpeg-turbo png_static tiff hmm) | ||||||||||||||||||||
| target_link_libraries(plateau PRIVATE ${JPEG_TURBO_LIBRARIES} png_static tiff hmm) | ||||||||||||||||||||
| target_include_directories(plateau PRIVATE | ||||||||||||||||||||
|
Comment on lines
+34
to
36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major ❓ Verification inconclusivepng15_static → png_static 置換は妥当。Windows 向けに 差し替えは正しいです。Windows で静的 libpng を使う場合、消費側が add_dependencies(plateau libjpeg-turbo png_static tiff hmm)
target_link_libraries(plateau PRIVATE ${JPEG_TURBO_LIBRARIES} png_static tiff hmm)
+if(WIN32)
+ target_compile_definitions(plateau PUBLIC PNG_STATIC)
+endif()🏁 Script executed: #!/bin/bash
# リポジトリ内に png15_static の残存参照がないか確認
rg -nP 'png15_static'Length of output: 0 Windowsビルド向けにPNG_STATIC定義を追加 add_dependencies(plateau libjpeg-turbo png_static tiff hmm)
target_link_libraries(plateau PRIVATE ${JPEG_TURBO_LIBRARIES} png_static tiff hmm)
+if(WIN32)
+ target_compile_definitions(plateau PUBLIC PNG_STATIC)
+endif()📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||
| "${JPEG_TURBO_INCLUDE_DIRS}" | ||||||||||||||||||||
| "${PNG_INCLUDE_DIRS}" | ||||||||||||||||||||
| "${TIFF_INCLUDE}" | ||||||||||||||||||||
| "${HMM_INCLUDE}" | ||||||||||||||||||||
| ) | ||||||||||||||||||||
| else() | ||||||||||||||||||||
| target_link_libraries(plateau PUBLIC | ||||||||||||||||||||
| "citygml" | ||||||||||||||||||||
| "GLTFSDK" | ||||||||||||||||||||
| "crypto" | ||||||||||||||||||||
| "ssl" | ||||||||||||||||||||
| target_link_libraries(plateau PUBLIC | ||||||||||||||||||||
| "citygml" | ||||||||||||||||||||
| "GLTFSDK" | ||||||||||||||||||||
| "crypto" | ||||||||||||||||||||
| "ssl" | ||||||||||||||||||||
| "c_wrapper" | ||||||||||||||||||||
| "png15_static" | ||||||||||||||||||||
| "png_static" | ||||||||||||||||||||
| "${LibOpenMeshCore}" | ||||||||||||||||||||
| "${LibOpenMeshTools}" | ||||||||||||||||||||
| "hmm" | ||||||||||||||||||||
|
|
@@ -97,7 +95,7 @@ if(BUILD_LIB_TYPE STREQUAL "static") | |||||||||||||||||||
| $<TARGET_FILE:LibXml2> | ||||||||||||||||||||
| $<TARGET_FILE:httplib> | ||||||||||||||||||||
| $<TARGET_FILE:zlibstatic> | ||||||||||||||||||||
| $<TARGET_FILE:png15_static> | ||||||||||||||||||||
| $<TARGET_FILE:png_static> | ||||||||||||||||||||
| $<TARGET_FILE:tiff> | ||||||||||||||||||||
| $<TARGET_FILE:hmm> | ||||||||||||||||||||
| ${JPEG_TURBO_LIBRARIES} | ||||||||||||||||||||
|
|
@@ -116,7 +114,7 @@ if(BUILD_LIB_TYPE STREQUAL "static") | |||||||||||||||||||
| endif() | ||||||||||||||||||||
|
|
||||||||||||||||||||
| if(BUILD_LIB_TYPE STREQUAL "static") | ||||||||||||||||||||
| set(COMBINE_LIB_DEPENDS plateau citygml xerces-c GLTFSDK crypto ssl LibXml2 httplib zlibstatic libjpeg-turbo png15_static tiff ${LibOpenMeshCore} ${LibOpenMeshTools} hmm) | ||||||||||||||||||||
| set(COMBINE_LIB_DEPENDS plateau citygml xerces-c GLTFSDK crypto ssl LibXml2 httplib zlibstatic libjpeg-turbo png_static tiff ${LibOpenMeshCore} ${LibOpenMeshTools} hmm) | ||||||||||||||||||||
|
|
||||||||||||||||||||
| # windows で libファイル結合します。 | ||||||||||||||||||||
| # 参考 : https://stackoverflow.com/questions/60190374/how-to-bundle-multiple-static-libraries-into-single-library-in-cmake-for-windows | ||||||||||||||||||||
|
|
||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PNG_STATIC の再代入(型不整合)を削除してください
PNG_STATIC ONの直後にset(PNG_STATIC "defined" ...)を文字列で再代入しており、オプションの意味を壊します。重複かつ誤用の可能性が高いです。後者の行を削除してください。Windows の消費側にPNG_STATICマクロが必要なら、ターゲット側へtarget_compile_definitions(... PUBLIC PNG_STATIC)を付けるのが正攻法です(別コメントで提案)。-set(PNG_STATIC "defined" CACHE STRING "" FORCE)📝 Committable suggestion
🤖 Prompt for AI Agents