How to create a shared library with cmake?
Always specify the minimum required version of cmake cmake_minimum_required(VERSION 3.9) You should declare a project. cmake says it is mandatory and it will define convenient variables PROJECT_NAME, PROJECT_VERSION and PROJECT_DESCRIPTION (this latter variable necessitate cmake 3.9): project(mylib VERSION 1.0.1 DESCRIPTION “mylib description”) Declare a new library target. Please avoid the use of file(GLOB …). This … Read more