X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=mussa.git;a=blobdiff_plain;f=CMakeLists.txt;h=747e7e4cf1b59bb69bf262da61579f0226a35172;hp=755d6d86d4c8678f40edbf5e7fa99ed37e20aaaf;hb=4c1d1e263deea85ab00823282c5ca5fc00fa8c26;hpb=1e6617194d9184cf4ca7069291fb3d9ae7467dc0 diff --git a/CMakeLists.txt b/CMakeLists.txt index 755d6d8..747e7e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,8 @@ FIND_PACKAGE(OpenGL) FIND_PACKAGE(Boost) FIND_PACKAGE(PythonLibs) +SET(USE_PYTHON 1) + INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH} ${QT_INCLUDES} ${BOOST_INCLUDE_DIR} ) @@ -32,6 +34,11 @@ INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH} # all of our source files al relative to the root of our project INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}) ADD_SUBDIRECTORY( doc ) +IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/paircomp) + MESSAGE(STATUS "Found paircomp") + SET(USE_PAIRCOMP 1) + ADD_SUBDIRECTORY( paircomp ) +ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/paircomp) ADD_SUBDIRECTORY( alg ) ADD_SUBDIRECTORY( qui ) ADD_SUBDIRECTORY( py ) @@ -41,13 +48,10 @@ SET(MAIN_SOURCES ADD_EXECUTABLE(mussagl WIN32 MACOSX_BUNDLE ${MAIN_SOURCES} ) -SET(PYTHON_CFLAGS "-DUSE_PYTHON") - # For windows you need to go from library with the most dependencies # to the library with the least dependencies -diane TARGET_LINK_LIBRARIES(mussagl mussa_qui - mussa_py mussa_core ${QT_LIBRARIES} # Including QT_LIBS twice is for dealing with linking dependancies @@ -56,12 +60,21 @@ TARGET_LINK_LIBRARIES(mussagl ${BOOST_FILESYSTEM_LIBRARY} ${BOOST_SERIALIZATION_LIBRARY} ${BOOST_PROGRAM_OPTIONS_LIBRARY} - ${BOOST_PYTHON_LIBRARY} - ${PYTHON_LIBRARIES} - ${PYTHON_LINK_LIBRARIES} ${OPENGL_gl_LIBRARY} ) +IF(USE_PYTHON) + SET(PYTHON_CFLAGS "-DUSE_PYTHON") + TARGET_LINK_LIBRARIES(mussagl + mussa_py + ${QT_LIBRARIES} + mussaqui_py + ${BOOST_PYTHON_LIBRARY} + ${PYTHON_LIBRARIES} + ${PYTHON_LINK_LIBRARIES}) +ENDIF(USE_PYTHON) + + GET_MUSSA_COMPILE_FLAGS(MAIN_CFLAGS) GET_MUSSA_LINK_FLAGS(MAIN_LDFLAGS)