-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
Qt Creator 13.0.0
This bug report is following the conversation under bug report 29662.
Since the commits to fix the previously mentionned issue, path to linked shared library .dll is no longer added to the PATH variable (When "Add build library search path to PATH" checked).
This has been revert to work as in QtCreator 12.0 in commit 725cf06, but I want to understand the problem.
I investigate a bit why this change occures and here is what I discover :
The library is no part of input.targetDetails in function :
src/plugins/cmakeprojectmanager/fileapidataextractor.cpp
QList<CMakeBuildTarget> generateBuildTargets(const QFuture<void> &cancelF const FilePath &buildDirectory, bool relativeLibs)
I First get into this case with an already compiled shared library, so I just fix my problem by doing the copy of .dll at POST_BUILD into the exe output directory.
But the problem occures also when the target compile the shared library itself. In this case, QtCreator should detect the path of the shared library binaries.
project CMakeList.txt :
# Create the project project(cmake-example) # Add subprojects add_subdirectory(mylib) add_subdirectory(myapp)
app CMakeList.txt :
add_executable(myapp src/main.cpp ) add_dependencies(myapp mylib) # Add dependancy to mylib target_link_libraries(myapp PRIVATE mylib) # Link mylib
library CMakeList.txt :
add_library(mylib SHARED)
Do my CMake configuration missing an information to make QtCreator detect the shared library ?