Skip to content

Commit

Permalink
Added better support for atypical numpy header locations
Browse files Browse the repository at this point in the history
  • Loading branch information
geert committed Oct 31, 2017
1 parent aba3fdd commit 86d8eca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)

IF(NOT WIN32)
SET(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib:$ORIGIN/")
SET(CMAKE_MACOSX_RPATH TRUE)
ENDIF(NOT WIN32)

set (CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 11)

# Set compile definitions to ignore some warnings
if (WIN32)
Expand Down
9 changes: 7 additions & 2 deletions io/multiresolutionimageinterface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,13 @@ IF(WRAP_MULTIRESOLUTIONIMAGEINTERFACE_PYTHON)

SWIG_ADD_LIBRARY(multiresolutionimageinterface LANGUAGE python SOURCES multiresolutionimageinterface.i)
SWIG_LINK_LIBRARIES(multiresolutionimageinterface multiresolutionimageinterface annotation core)
SWIG_LINK_LIBRARIES(multiresolutionimageinterface ${PYTHON_LIBRARIES} ${PYTHON_DEBUG_LIBRARIES})
target_include_directories(${SWIG_MODULE_multiresolutionimageinterface_REAL_NAME} PRIVATE ${DIAGPathology_BINARY_DIR}/annotation ${PYTHON_INCLUDE_DIR} ${PYTHON_INCLUDE_DIR}/../Lib/site-packages/numpy/core/include)
SWIG_LINK_LIBRARIES(multiresolutionimageinterface ${PYTHON_LIBRARIES} ${PYTHON_DEBUG_LIBRARIES})
IF(APPLE)
target_include_directories(${SWIG_MODULE_multiresolutionimageinterface_REAL_NAME} PRIVATE ${DIAGPathology_BINARY_DIR}/annotation ${PYTHON_INCLUDE_DIR} ${PYTHON_INCLUDE_DIR}/../../pkgs/numpy-1.13.1-py36_0/lib/python3.6/site-packages/numpy/core/include)
ELSEIF(APPLE)
target_include_directories(${SWIG_MODULE_multiresolutionimageinterface_REAL_NAME} PRIVATE ${DIAGPathology_BINARY_DIR}/annotation ${PYTHON_INCLUDE_DIR} ${PYTHON_INCLUDE_DIR}/../Lib/site-packages/numpy/core/include)
ENDIF(APPLE)

SET_TARGET_PROPERTIES(${SWIG_MODULE_multiresolutionimageinterface_REAL_NAME} PROPERTIES FOLDER pathology/diag/io)
SET_TARGET_PROPERTIES(${SWIG_MODULE_multiresolutionimageinterface_REAL_NAME} PROPERTIES DEBUG_POSTFIX _d)

Expand Down

0 comments on commit 86d8eca

Please sign in to comment.