26 lines
968 B
CMake
26 lines
968 B
CMake
include_guard(GLOBAL)
|
|
rcl_get_effective_install_dir(render_3D::PThreads4W PTHREADS4W_ROOT)
|
|
message("render_3D::PThreads4W PTHREADS4W_ROOT=${PTHREADS4W_ROOT}")
|
|
set(PThreads4W_INCLUDE_DIR "${PTHREADS4W_ROOT}/include")
|
|
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
set(PThreads4W_LIBRARY "${PTHREADS4W_ROOT}/lib/pthreadVC3d.lib")
|
|
else ()
|
|
set(PThreads4W_LIBRARY "${PTHREADS4W_ROOT}/lib/pthreadVC3.lib")
|
|
endif ()
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(PThreads4W
|
|
REQUIRED_VARS
|
|
PThreads4W_INCLUDE_DIR
|
|
PThreads4W_LIBRARY
|
|
)
|
|
if (PThreads4W_FOUND AND NOT TARGET PThreads4W::PThreads4W)
|
|
add_library(PThreads4W::PThreads4W UNKNOWN IMPORTED)
|
|
set_target_properties(PThreads4W::PThreads4W PROPERTIES
|
|
IMPORTED_LOCATION "${PThreads4W_LIBRARY}"
|
|
INTERFACE_INCLUDE_DIRECTORIES "${PThreads4W_INCLUDE_DIR}"
|
|
)
|
|
endif ()
|
|
mark_as_advanced(
|
|
PThreads4W_INCLUDE_DIR
|
|
PThreads4W_LIBRARY
|
|
) |