if (NOT FIND_ODE_LOADED) include (${INVRS_SOURCE_DIR}/cmake/FindHelperMacros.cmake) if (WIN32) set (ODE_SOURCE_PREDEF_PATHS ${INVRS_SOURCE_DIR}/external) set (ODE_SOURCE_PREDEF_SUFFIX ode-0.8) FIND_DIR_MACRO ("ODE v0.8 source" ODE_SOURCE_DIR ode/src/joint.h ODE_SOURCE_PREDEF_PATHS ODE_SOURCE_PREDEF_SUFFIX) set (ODE_PREDEF_PATHS "C:/Program\ Files/ode-0.8" "C:/Programme/ode-0.8") set (ODE_INCLUDE_PREDEF_PREFIX "include") FIND_INCLUDE_DIR_MACRO ("ODE v0.8" ODE ode/ode.h ODE_PREDEF_PATHS ODE_INCLUDE_PREDEF_PREFIX) set (ODE_LIBRARY_PREDEF_PREFIX "lib") FIND_LIBRARY_MACRO ("ODE v0.8" ODE ode ODE_PREDEF_PATHS ODE_LIBRARY_PREDEF_PREFIX) set (ODE_LIBRARIES ${ODE_ode_LIBRARY}) elseif (APPLE AND ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set (ODE_PREDEF_PATHS ${INVRS_SOURCE_DIR}/external) set (ODE_PREDEF_SUFFIX ode-0.8) FIND_DIR_MACRO ("ODE v0.8 source" ODE_SOURCE_DIR ode/src/joint.h ODE_PREDEF_PATHS ODE_PREDEF_SUFFIX) FIND_INCLUDE_DIR_MACRO ("ODE v0.8" ODE ode/ode.h EMPTY EMPTY) FIND_LIBRARY_MACRO ("ODE v0.8" ODE ode EMPTY EMPTY) # TODO: CHECK IF THIS WORKS ON MACS # SET(GLUT_glut_LIBRARY "-framework GLUT" CACHE STRING "GLUT library for OSX") set (ODE_LIBRARIES ${ODE_ode_LIBRARY}) elseif (UNIX) set (ODE_PREDEF_PATHS ${INVRS_SOURCE_DIR}/external) set (ODE_PREDEF_SUFFIX ode-0.8) FIND_DIR_MACRO ("ODE v0.8 source" ODE_SOURCE_DIR ode/src/joint.h ODE_PREDEF_PATHS ODE_PREDEF_SUFFIX) FIND_INCLUDE_DIR_MACRO ("ODE v0.8" ODE ode/ode.h EMPTY EMPTY) FIND_LIBRARY_MACRO ("ODE v0.8" ODE ode EMPTY EMPTY) set (ODE_LIBRARIES ${ODE_ode_LIBRARY}) else (WIN32) message (FATAL_ERROR "Unable to identify target operating system!") endif (WIN32) set (FIND_ODE_LOADED ON) endif (NOT FIND_ODE_LOADED)