Michael G. Hansen wrote:
Marie-Christine Vallet wrote:
I wanted to check for an non standard existing library (QGLViewer) and found a custom .cmake file on Internet that will do that for me. The problem is that I am starting cmake, and do not know where to place that custom .cmake file I found the custom .cmake file here: http://www-id.imag.fr/FLOWVR/manual/flowvr-suite-src/flowvr/cmake/FindQGLViewer.cmake


From looking at other projects, I think best practice is to put the file into a cmake_local or cmake_admin directory at the top of your source tree and then inserting the following code into your top-level CMakeLists.txt:

# Additional CMake modules for 3rd party library checks reside here
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_admin")

Cheers,
Mike
thanks,
now I don't have an error for finding the cmake module.

I still have a question, if I want to check if the paths exist, the only way to call this custom.cmake is to add MACRO(MACRO_FINDQGLVIEWER) and ENDMACRO(MACRO_FINDQGLVIEWER) in the script than to call this macro am I correct ? or is there a simpler way?
Thanks,
Marke
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to