Multiple Cmake in one project

Asked

Viewed 55 times

2

I am developing an application in C++, where I need to use a library I have developed before with Cmake. But I don’t want to call the binary directly because each platform will have to have a binary separately, and it gets boring having to compile each one to then compile the project, my question is the following: Can I call Cmake from my other project to compile the dependency and then compile this new project already linking the dependency? If yes, how will I perform this miracle? Project I want to use https://github.com/TigreFramework/String.
Cmake of the new project that will use this above:

cmake_minimum_required(VERSION 3.4)
project(DataBase)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

set(SOURCE_FILES main.cpp DataBase.cpp DataBase.h String.h libString.a)
add_executable(DataBase ${SOURCE_FILES})

1 answer

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.