Skip to content

Commit

Permalink
Merge pull request #168 from romainreignier/fix-python-include
Browse files Browse the repository at this point in the history
Fix Python include issue
  • Loading branch information
markusgft authored Oct 31, 2020
2 parents 22df486 + 4dadb14 commit b4684fe
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions ct_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,15 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/ct/core/templateDir.h.in ${CM

## define the directories to be included in all ct_core targets
list(APPEND ct_core_target_include_dirs ${EIGEN3_INCLUDE_DIR})
if(${Python_FOUND})
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
list(APPEND ct_core_target_include_dirs ${PYTHON_INCLUDE_DIRS})
else()
list(APPEND ct_core_target_include_dirs ${Python_INCLUDE_DIRS})
list(APPEND ct_core_target_include_dirs ${Python_NumPy_INCLUDE_DIRS})
endif()
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
if(PYTHONLIBS_FOUND)
list(APPEND ct_core_target_include_dirs ${PYTHON_INCLUDE_DIRS})
endif()
else()
if(Python_FOUND AND ${Python_VERSION_MAJOR} EQUAL 3)
list(APPEND ct_core_target_include_dirs ${Python_INCLUDE_DIRS})
list(APPEND ct_core_target_include_dirs ${Python_NumPy_INCLUDE_DIRS})
endif()
endif()
list(APPEND ct_core_target_include_dirs ${QWT_INCLUDE_DIR})
list(APPEND ct_core_target_include_dirs $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
Expand Down

0 comments on commit b4684fe

Please sign in to comment.