FIND_PACKAGE(Lua51) FIND_PACKAGE(V8) FIND_PACKAGE(PythonLibs) IF (LUA_LIBRARIES AND LUA_INCLUDE_DIR) SET(LUA_FOUND True) ENDIF() IF (V8_FOUND) ADD_DEFINITIONS(-DUSE_V8) SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} ${V8_LIBRARY}) INCLUDE_DIRECTORIES(${V8_INCLUDE_DIR} ) MESSAGE("We have found V8") ELSE() MESSAGE("We have NOT found V8") ENDIF() IF (LUA_FOUND) ADD_DEFINITIONS(-DUSE_LUA) SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} ${LUA_LIBRARY}) INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR} ) MESSAGE("We have found Lua") ELSE() MESSAGE("We have NOT found Lua") ENDIF() IF (PYTHONLIBS_FOUND) MESSAGE("We have found Python") SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} ${PYTHON_LIBRARY}) INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIR} ) ADD_DEFINITIONS(-DUSE_PYTHON) ELSE() MESSAGE("We have NOT found Python") ENDIF() SET(TARGET_SRC osgpresentation.cpp ) #### end var setup ### SETUP_EXAMPLE(osgpresentation)