Skip to content

Instantly share code, notes, and snippets.

@robertmaynard
robertmaynard / example.cmake
Created March 15, 2013 14:19
cmake example of optional libraries
find_package(Python)
if(Python_FOUND)
#if python exists enable plugins that depend on python, this allows the user
#to turn off the python plugins even if python is found
option(ENABLE_Python_plugins "Turn on Plugins that depend on python existing" ${Python_FOUND})
endif()
#if you have your python dependent plugins in a directory you can do this