diff options
author | Tomasz Dwojak <t.dwojak@amu.edu.pl> | 2017-06-29 23:46:42 +0300 |
---|---|---|
committer | Tomasz Dwojak <t.dwojak@amu.edu.pl> | 2017-06-29 23:46:42 +0300 |
commit | 19b9cd4f68e1e34cbff2b9301353a9c18adb315a (patch) | |
tree | e8a5a04fb1e1eef67abb092532c6a83c8da930da | |
parent | 2a9d300bbdbb14f2c4d376368fa3937c20dfd5cb (diff) |
probably fix pythonfixPython
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c4a45f73..7253719e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,7 @@ else(CUDA) add_definitions(-DNO_CUDA) endif(CUDA) -find_package(Boost COMPONENTS system filesystem program_options timer iostreams python thread) +find_package(Boost COMPONENTS system filesystem program_options timer iostreams thread) if(Boost_FOUND) include_directories(${Boost_INCLUDE_DIRS}) set(EXT_LIBS ${EXT_LIBS} ${Boost_LIBRARIES}) @@ -57,13 +57,16 @@ else(Boost_FOUND) endif(Boost_FOUND) find_package(PythonLibs 2.7) -if(PYTHONLIBS_FOUND) +find_package(Boost COMPONENTS python) +if(PYTHONLIBS_FOUND AND Boost_PYTHON_FOUND) message("-- Found Python" ) include_directories(${PYTHON_INCLUDE_DIRS}) set(EXT_LIBS ${EXT_LIBS} ${PYTHON_LIBRARIES}) -else(PYTHONLIBS_FOUND) + include_directories(${Boost_INCLUDE_PYTHON_DIRS}) + set(EXT_LIBS ${EXT_LIBS} ${Boost_PYTHON_LIBRARY}) +else(PYTHONLIBS_FOUND AND Boost_PYTHON_FOUND) message("-- Cannot find python libraries. Building without bindings." ) -endif(PYTHONLIBS_FOUND) +endif(PYTHONLIBS_FOUND AND Boost_PYTHON_FOUND) find_package (ZLIB) if (ZLIB_FOUND) |