Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
Qt Creator 8.0.1
-
None
-
Qt Creator 8.0.1
Based on Qt 6.3.1 (GCC 10.3.1 20210422 (Red Hat 10.3.1-1), x86_64)
Built on Aug 11 2022 01:10:15
From revision 9c963ce8ae
Copyright 2008-2022 The Qt Company Ltd. All rights reserved.
The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The Qt logo as well as Qt®, Qt Quick®, Built with Qt®, Boot to Qt®, Qt Quick Compiler®, Qt Enterprise®, Qt Mobile® and Qt Embedded® are registered trademarks of The Qt Company Ltd.
----------------------------
cmake version 3.23.3
CMake suite maintained and supported by Kitware (kitware.com/cmake).
----------------------------
Linux ubuntu 5.15.0-48-generic #54~20.04.1-Ubuntu SMP Thu Sep 1 16:17:26 UTC 2022 x86_64 x86_64 x86_64 GNU/LinuxQt Creator 8.0.1 Based on Qt 6.3.1 (GCC 10.3.1 20210422 (Red Hat 10.3.1-1), x86_64) Built on Aug 11 2022 01:10:15 From revision 9c963ce8ae Copyright 2008-2022 The Qt Company Ltd. All rights reserved. The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. The Qt logo as well as Qt®, Qt Quick®, Built with Qt®, Boot to Qt®, Qt Quick Compiler®, Qt Enterprise®, Qt Mobile® and Qt Embedded® are registered trademarks of The Qt Company Ltd. ---------------------------- cmake version 3.23.3 CMake suite maintained and supported by Kitware (kitware.com/cmake). ---------------------------- Linux ubuntu 5.15.0-48-generic #54~20.04.1-Ubuntu SMP Thu Sep 1 16:17:26 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Description
This is a CMakeLists1.txt:
set(MY_SRCS ....) add_library(target_static STATIC ${MY_SRCS})
then, run camke, there is a build target named target_static in Activate Projects View and I can handle my project via it.
here is CMakeLists2.txt:
set(MY_SRCS ....) add_library(target_static STATIC ${MY_SRCS}) add_library(target_shared SHARED $<TARGET_OBJECTS:target_static>)
then, run camke again, there is only a build target named target_static again but no target_shared. This is the problem
and CMakeList3.txt:
set(MY_SRCS ....) add_library(target_static STATIC ${MY_SRCS}) add_library(target_shared SHARED $<TARGET_OBJECTS:target_static> any.cpp)
both work perfectly!