I started learning about cmake and make recently and I ran into a problem I am unable to solve.
I have two projects, a small test application that uses cmake in the IDE CLion and a librarie that uses make, I can't change the build systems for either. I would like to build the one that uses make, from the cmake project. The make file for the library works fine on it's own.
This is the project layout:
project/CMakeLists.txt
project/libvz/Makefile
project/libvz/main.cpp
I have tried the following:
CMakeLists.txt:
cmake_minimum_required(VERSION 3.0.0)
project(builder)
add_custom_target("libvz"
"/usr/bin/make -f ${CMAKE_CURRENT_SOURCE_DIR}/libvz/Makefile")
In this case I get the error: "/bin/sh: /usr/bin/make -f /home/szil/project/libvz/Makefile: No such file or directory"
I also tried to build using the ExternalProject_Add and ExternalProject_Add_Step commands, but neither worked for me.
Any help is appreciated, Thx!