FIND_PACKAGE(PythonLibs) set(Boost_USE_STATIC_LIBS OFF) set(Boost_USE_MULTITHREADED ON) FIND_PACKAGE(Boost 1.36.0 COMPONENTS program_options filesystem serialization python unit_test_framework ) INCLUDE(Platform) IF(Boost_PYTHON_FOUND) SET(SOURCES test_python.cpp ) GET_MUSSA_COMPILE_FLAGS(PY_TEST_CFLAGS) GET_MUSSA_LINK_FLAGS(PY_TEST_LDFLAGS) SET_SOURCE_FILES_PROPERTIES( ${SOURCES} COMPILE_FLAGS "${PY_TEST_CFLAGS}" ) ADD_EXECUTABLE(mussa_python_test ${SOURCES}) ADD_TEST(mussa_python_test ${CMAKE_BINARY_DIR}/py/test/mussa_python_test) LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/alg}) # Really it is important to go from library with the most dependencies to least TARGET_LINK_LIBRARIES(mussa_python_test mussa_qui mussa_py mussa_core ${QT_QTCORE_LIBRARY} ${OPENGL_gl_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${Boost_SERIALIZATION_LIBRARY} ${Boost_PYTHON_LIBRARY} ${PYTHON_LIBRARIES} ${PYTHON_LINK_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ) SET_TARGET_PROPERTIES( mussa_python_test PROPERTIES COMPILE_FLAGS "${PY_TEST_CFLAGS}" LINK_FLAGS "${PY_TEST_LDFLAGS}" ) ENDIF(Boost_PYTHON_FOUND)