Skip to content

Commit

Permalink
Make Qt build static
Browse files Browse the repository at this point in the history
  • Loading branch information
bialger committed Sep 15, 2024
1 parent e7423d0 commit a7ece87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 1 addition & 10 deletions bin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,4 @@ add_executable(${PROJECT_NAME}
main.cpp
)

if (WIN32)
add_custom_command(
TARGET ${PROJECT_NAME}
POST_BUILD
COMMAND "${QT_BIN_DIR}/windeployqt.exe"
ARGS "${CMAKE_BINARY_DIR}/bin"
)
endif ()

target_link_libraries(${PROJECT_NAME} PRIVATE qt)
target_link_libraries(${PROJECT_NAME} PRIVATE qt)
2 changes: 1 addition & 1 deletion lib/qt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if (NOT Qt6_FOUND)
set(QT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/qt-build")
file(MAKE_DIRECTORY ${QT_BUILD_DIR})
message(STATUS "Configuring...")
execute_process(COMMAND "${QT_SOURCE_DIR}/configure${CONFIG_SCRIPT_EXT}" -prefix ${QT_BUILD_DIR}
execute_process(COMMAND "${QT_SOURCE_DIR}/configure${CONFIG_SCRIPT_EXT}" -static -prefix ${QT_BUILD_DIR}
WORKING_DIRECTORY ${QT_BUILD_DIR})

# Build Qt
Expand Down

0 comments on commit a7ece87

Please sign in to comment.