This commit is contained in:
taynpg 2024-04-30 20:28:49 +08:00
commit c1887b2797
3 changed files with 44 additions and 0 deletions

View File

@ -310,3 +310,11 @@ target_link_libraries(useopencv4 PRIVATE
其中可以使用find_library
find_library(SDL2MAIN SDL2main ${SDL2_DIR}/lib)
不过貌似只能单个找寻。
:: build pre or after to do
get_target_property(LIB_TYPE xxx TYPE)
add_custom_command(TARGET xxx POST_BUILD/PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${LIBRARY_OUTPUT_PATH}/libxxx.a
/home/typ/3rd/)

View File

@ -25,6 +25,37 @@ set QDOC_USE_STATIC_LIBCLANG=1
3.配置选项
configure -debug-and-release -confirm-license -opensource -platform win32-msvc -prefix "G:\\vs2019_Pro_dev\\3rd\\qt5.15.12" -qt-sqlite -qt-pcre -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -opengl dynamic -skip qtwebengine -nomake tests -no-compile-examples -mp
==============================================================================================
【实际的一次Qt5编译记录】
1.install scoop
2.scoop install python ruby perl jom(注意官网有最低版本限制,要注意)
3.extract win_flex_bison-2.5.25 添加环境变量并且复制一份无win_开头的exe
4.解压libclan*预编译的clang环境。
5.打开msvc开发cmd环境,示例:
set PATH=%PATH%;E:\libclang\bin
set LLVM_INSTALL_DIR=E:\libclang
************************************************************************************************
set QDOC_USE_STATIC_LIBCLANG=1
关于这个变量介绍:实测libclang-release_60-windows-vs2015_64.7z才有static,使用别的无libclang_static.lib的不要设置这个,使用release_60这个
编译又缺少LLVMMCA.lib,没继续测试了,再试一试不设置QDOC_USE_STATIC_LIBCLANG=1,
用动态库算了(最终生成的qdoc.exe还需要带着llvm的一些dll库才能用)。
用动态库测试结果:成功编译出qdoc.exe
************************************************************************************************
6.确保以上Perl、Python、flex、bison、ruby、clang等可以执行。
7.进入到源码根目录:
.\configure.bat -debug-and-release -confirm-license -opensource -prefix "D:\Qt5Comp\out" -skip qtwebengine -nomake tests -no-compile-examples
8.执行jom开始构建。
9.构建和安装文档:
jom docs && jom install_docs
不着急的话建议 nmake && nmake install
如果使用的是 nmake,文档使用:
nmake docs && nmake install_docs
10.以上实测成功环境为:
(1)VS2017_15.9.61
(2)libclang-release_80-based-windows-vs2017_64.7z(动态qdoc)
(3)源码为Qt5.15.13
==============================================================================================
3.编译错误处理:
(3.1)编译报错E2512 功能测试宏的参数必须是简单标识符 的解决方法(qcompilerdetection.h)
参考链接:https://www.bilibili.com/read/cv7477923/

5
virtual/vmbox.txt Normal file
View File

@ -0,0 +1,5 @@
1.VirtualBox Set Shared Folder And Set Authority
(1) mount position: /mnt/shared
(2) fixed allocation
(3) sudo usermod -aG vboxsf $(whoami)
(4) sudo reboot now