CMAKE: Build library and link against it

前端 未结 4 1944
挽巷
挽巷 2021-02-13 20:38

I\'m trying to use cmake (on Linux with GNU make and g++) to build a project with two sub-directories: MyLib and MyApp. MyLib contains source for a static library; MyApp needs

4条回答
  •  猫巷女王i
    2021-02-13 21:09

    Do not add libraries and executables in the root Cmakelists.txt. Add these libraries and executables in Cmakelists.txt of subdirectories.

提交回复
热议问题