OpenMesh
|
In this tutorial we will explain, how to create a new project using OpenMesh and build it with the CMake build system.
We assume, that you have already downloaded the OpenMesh source files as well as installed the CMake build tools.
There are quite few steps to follow to successfully add your own application to the build tree:
include (ACGCommon) include_directories ( ../../.. ${CMAKE_CURRENT_SOURCE_DIR} ) set (targetName MyOwnProject) # collect all header and source files acg_append_files (headers "*.hh" .) acg_append_files (sources "*.cc" .) acg_add_executable (${targetName} ${headers} ${sources}) target_link_libraries (${targetName} OpenMeshCore OpenMeshTools )
(Remember to replace "MyProjectName" with whatever you have chosen as your project's name. Note: If you don't want to use *.hh and *.cc as your C++ source file suffices, you'll have to change this, too, because CMake won't build your sources otherwise.
add_subdirectory (MyOwnProject)
cmake ..
make
That's all. Your project will now be built.