# For Python this is the grand-parent of the
# include directory:
GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${PYTHON_INCLUDE_DIR}" PATH)
- GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH)
+ IF(NOT WIN32)
+ GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH)
+ ENDIF()
# 4. Warn if CMake found something not located under ENV(XYZ_ROOT_DIR)
IF(DEFINED ENV{PYTHON_ROOT_DIR})
ENDIF ()
IF(WIN32)
- SET(PTHREADS_FIND_PATHS_OPTION NO_DEFAULT_PATH)
SET(PTHREADS_INCLUDE_TO_FIND pthread.h)
- SET(PTHREADS_INCLUDE_PATHS ${PTHREAD_ROOT_DIR}/include)
- FIND_PATH(PTHREAD_INCLUDE_DIR ${PTHREADS_INCLUDE_TO_FIND}
- PATHS ${PTHREADS_INCLUDE_PATHS} ${PTHREADS_FIND_PATHS_OPTION})
- SET(PTHREADS_LIB_PATHS ${PTHREAD_ROOT_DIR}/lib)
+ FIND_PATH(PTHREAD_INCLUDE_DIR ${PTHREADS_INCLUDE_TO_FIND})
# Default build type is assumed to be Release:
IF(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
- FIND_LIBRARY(PTHREAD_LIBRARY pthreadVSE2 pthreadVC2
- PATHS ${PTHREADS_LIB_PATHS} ${PTHREADS_FIND_PATHS_OPTION})
+ FIND_LIBRARY(PTHREAD_LIBRARY pthreadVC2)
ELSE()
- FIND_LIBRARY(PTHREAD_LIBRARY pthreadVSE2d pthreadVC2d
- PATHS ${PTHREADS_LIB_PATHS} ${PTHREADS_FIND_PATHS_OPTION})
+ FIND_LIBRARY(PTHREAD_LIBRARY pthreadVC2d)
ENDIF()
ELSE(WIN32)
FIND_PATH(PTHREAD_INCLUDE_DIR pthread.h)