hello, i’m trying to build a c++ project with a library build from source .
What i have :
i’ve succesfuly make an out of source project (urho3d.github.io/documentation/a00004.html)
in my “Source” directory i’ve a Tools\mylib\src (with .hh & .cc for the lib)
this is the “CMakeLists.txt” from Source :
and the “CMakeLists.txt” in the libdirectory :
when i launch the “cmake_mingw.bat” cmake instruction in base directory it’s ok, output :
-- The C compiler identification is GNU 4.8.1
-- The CXX compiler identification is GNU 4.8.1
-- Check for working C compiler: C:/MinGW-4.8.1/bin/gcc.exe
-- Check for working C compiler: C:/MinGW-4.8.1/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/MinGW-4.8.1/bin/g++.exe
-- Check for working CXX compiler: C:/MinGW-4.8.1/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Using SSE2 instead of SSE because SSE fails on some Windows ports of GCC
-- Disable SSE with the CMake option -DENABLE_SSE=0 if this is not desired
-- Found Urho3D: C:/Urho3D/Lib/libUrho3D.a
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Urho3D/testProject/Build
and now the “make” error :
-- Using SSE2 instead of SSE because SSE fails on some Windows ports of GCC
-- Disable SSE with the CMake option -DENABLE_SSE=0 if this is not desired
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Urho3D/testProject/Build
Scanning dependencies of target Main
[ 7%] Building CXX object CMakeFiles/Main.dir/HelloWorld.cpp.obj
C:\Urho3D\testProject\Source\HelloWorld.cpp:32:21: fatal error: mylib.hh: No such file or directory
#include "mylib.hh"
i can add in include root “CMakeLists.txt” some include, but i want to use the same logic & tools the Urho3d build system use for his own library.
For me it didn’t detect “main” depand on “mylib”.
Could you help me to solve this little case ?