Skip to content
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

Windows: Automatically collect Qt DLLs when installing #170

Open
Ghabry opened this issue Mar 31, 2021 · 1 comment
Open

Windows: Automatically collect Qt DLLs when installing #170

Ghabry opened this issue Mar 31, 2021 · 1 comment
Labels
Milestone

Comments

@Ghabry
Copy link
Member

Ghabry commented Mar 31, 2021

Basicly #141 but for Windows. A similiar patch should even work.

See also #147

@Ghabry
Copy link
Member Author

Ghabry commented Mar 31, 2021

The target_link_library Qt5::QSvgIconPlugin is broken when doing a build against a Qt DLL but necessary when building against a static Qt.

This must be made conditional

qsvgicond.dll : fatal error LNK1107: invalid or corrupt file: cannot read
at 0x3A0 [EasyRPG_Editor_exe.vcxproj]

The plugin is dynamically loaded by Qt so maybe the DLL is just not intended to be used this way...


Potential patch but have to check what qt_type contains when using this as a static lib.
For shared it is MODULE_LIBRARY.

if(WIN32)
	# Linking against QSvgIconPlugin fails when it is a DLL
	# It is dynamically loaded by Qt instead
	get_target_property(qt_type Qt5::QSvgIconPlugin TYPE)
	message(FATAL_ERROR ${qt_type})
	if (qt_type STREQUAL STATIC_LIBRARY)
		target_link_libraries(${PROJECT_NAME} Qt5::QSvgIconPlugin)
	endif()
else()
	target_link_libraries(${PROJECT_NAME} Qt5::QSvgIconPlugin)
endif()

@Ghabry Ghabry added this to the 0.1 milestone Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant