I tried to search the CMake documentation, but I couldn't figure out how to call external programs from CMake.
There are few things I want to do.
- Compile other third-party dependencies that uses a makefile
- Compile Thrift definition files to C++ / Python stubs.
- Compile Cython definition files.
Another question is, what is a good way to handle those cases anyway? It feels like calling a shell script directly from CMake doesn't feel so clean, when "C" in CMake stands for Cross Platform.
EDIT: I have few extra questions. Before, in my build, I prebu开发者_开发百科ilt my dependencies, and the project itself used FIND_PACKAGE(...) to find the header / libraries for the dependencies.
Now, I'm ExternalProject_Add() to compile the dependencies, but the problem is, all my FindXYZ() functions fails when I run cmake .
, because the dependencies aren't present when CMake gets executed.
How should I include the third-party libraries in my project in this case?
- http://www.kitware.com/media/html/BuildingExternalProjectsWithCMake2.8.html
2+3. can be hacked with CONFIGURE_COMMAND/BUILD_COMMAND/INSTALL_COMMAND
精彩评论