Skip to content

Commit

Permalink
Fix CMake compatibility issues with Visual Studio 2019
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunderlandkyl committed Jun 15, 2019
1 parent 82c2ca2 commit 68124f7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
19 changes: 9 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,17 @@ IF(MSVC OR ${CMAKE_GENERATOR} MATCHES "Xcode")
ENDIF()

MESSAGE(STATUS "Configuring PLUS toolkit version ${PLUSLIB_VERSION}.")

IF(MSVC OR ${CMAKE_GENERATOR} MATCHES "Xcode")
IF( ${CMAKE_GENERATOR} MATCHES "Win64")
SET(PLUSLIB_PLATFORM "Win64" CACHE STRING "Name of the platform this instance of PlusLib is built on")
ELSE()
SET(PLUSLIB_PLATFORM "Win32" CACHE STRING "Name of the platform this instance of PlusLib is built on")
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(PLUSLIB_PLATFORM "Win64" CACHE STRING "Name of the platform this instance of PlusLib is built on" FORCE)
ELSEIF(CMAKE_SIZEOF_VOID_P EQUAL 4)
SET(PLUSLIB_PLATFORM "Win32" CACHE STRING "Name of the platform this instance of PlusLib is built on" FORCE)
ENDIF()
ELSE()
IF(APPLE)
SET(PLUSLIB_PLATFORM "OSX" CACHE STRING "Name of the platform this instance of PlusLib is built on")
SET(PLUSLIB_PLATFORM "OSX" CACHE STRING "Name of the platform this instance of PlusLib is built on" FORCE)
ELSE()
SET(PLUSLIB_PLATFORM "Linux" CACHE STRING "Name of the platform this instance of PlusLib is built on")
SET(PLUSLIB_PLATFORM "Linux" CACHE STRING "Name of the platform this instance of PlusLib is built on" FORCE)
ENDIF()
ENDIF()

Expand Down Expand Up @@ -165,7 +164,7 @@ ENDIF()

SET(PHIDGET_SPATIAL_BASE_DIR ${PLUSLIB_TOOLS_DIR}/Phidget/Phidget22)
SET(PHIDGET_SPATIAL_INCLUDE_DIR ${PHIDGET_SPATIAL_BASE_DIR} CACHE PATH "Path to the Phidget Spatial include folder" FORCE )
IF(MSVC AND ${CMAKE_GENERATOR} MATCHES "Win64")
IF(MSVC AND ${PLUSLIB_PLATFORM} MATCHES "Win64")
SET(PHIDGET_SPATIAL_LIB_DIR ${PHIDGET_SPATIAL_BASE_DIR}/x64 CACHE PATH "Path to the Phidget Spatial 64-bit lib folder" FORCE )
SET(PHIDGET_SPATIAL_BINARY_DIR ${PHIDGET_SPATIAL_BASE_DIR}/x64 CACHE PATH "Path to the Phidget Spatial 64-bit dll folder" FORCE )
ELSE()
Expand All @@ -183,7 +182,7 @@ ENDIF()

SET(EPIPHAN_SDK_BASE_DIR ${PLUSLIB_TOOLS_DIR}/Epiphan)
SET(EPIPHAN_INCLUDE_DIR ${EPIPHAN_SDK_BASE_DIR} CACHE PATH "Path to the Epiphan SDK include directory." FORCE )
IF(MSVC AND ${CMAKE_GENERATOR} MATCHES "Win64")
IF(MSVC AND ${PLUSLIB_PLATFORM} MATCHES "Win64")
SET(EPIPHAN_BINARY_DIR ${EPIPHAN_SDK_BASE_DIR}/x64 CACHE PATH "Directory containing Epiphan shared library file." FORCE)
SET(EPIPHAN_LIB_DIR ${EPIPHAN_SDK_BASE_DIR}/x64 CACHE PATH "Directory containing Epiphan static library file." FORCE)
ELSE()
Expand Down Expand Up @@ -215,7 +214,7 @@ ENDIF()
IF(WIN32)
SET(NVIDIA_DVP_BASE_DIR ${PLUSLIB_TOOLS_DIR}/NVidia/dvp170)
SET(NVIDIA_DVP_INCLUDE_DIR ${NVIDIA_DVP_BASE_DIR}/include CACHE PATH "Path to the NVidia DVP include directory." FORCE )
IF(MSVC AND ${CMAKE_GENERATOR} MATCHES "Win64")
IF(MSVC AND ${PLUSLIB_PLATFORM} MATCHES "Win64")
SET(NVIDIA_DVP_BINARY_DIR ${NVIDIA_DVP_BASE_DIR}/bin/x64 CACHE PATH "Directory containing NVidia DVP shared library file." FORCE)
SET(NVIDIA_DVP_LIB_DIR ${NVIDIA_DVP_BASE_DIR}/lib/x64 CACHE PATH "Directory containing NVidia DVP static library file." FORCE)
ELSE()
Expand Down
4 changes: 2 additions & 2 deletions src/PlusDataCollection/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ IF( PLUS_USE_Ascension3DG )
)

ADD_LIBRARY(Ascension3DG SHARED IMPORTED)
IF( (MSVC AND ${CMAKE_GENERATOR} MATCHES "Win64") OR MINGW )
IF( (MSVC AND ${PLUSLIB_PLATFORM} MATCHES "Win64") OR MINGW )
SET(Ascension3DG_LIB_FILE ${ATC_TRAKSTAR_LIB_DIR}/ATC3DG64${CMAKE_STATIC_LIBRARY_SUFFIX} CACHE FILEPATH "Lib file for Ascension3DG.")
SET(Ascension3DG_SHARED_LIB_FILE ${ATC_TRAKSTAR_BINARY_DIR}/ATC3DG64${CMAKE_SHARED_LIBRARY_SUFFIX} CACHE FILEPATH "DLL file for Ascension3DG.")
ELSE()
Expand Down Expand Up @@ -1585,7 +1585,7 @@ IF(PLUS_USE_INTERSON_VIDEO)
${CMAKE_CURRENT_SOURCE_DIR}/Interson
)

IF(${CMAKE_GENERATOR} MATCHES Win64)
IF(${PLUSLIB_PLATFORM} MATCHES "Win64")
LIST(APPEND External_Libraries_Install
${INTERSON_WIN64_BINARY_DIR}/USBprobe${CMAKE_SHARED_LIBRARY_SUFFIX}
${INTERSON_BINARY_DIR}/BmodeUSB${CMAKE_SHARED_LIBRARY_SUFFIX}
Expand Down
2 changes: 1 addition & 1 deletion src/PlusImageProcessing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ SET(${PROJECT_NAME}_LIBS
)

IF(PLUS_USE_INTEL_MKL)
IF(${CMAKE_GENERATOR} MATCHES Win64)
IF(${PLUSLIB_PLATFORM} MATCHES "Win64")
SET(MKL_LIBS
"${IntelComposerXEdir}/mkl/lib/intel64/mkl_intel_lp64_dll.lib"
"${IntelComposerXEdir}/mkl/lib/intel64/mkl_intel_thread_dll.lib"
Expand Down

0 comments on commit 68124f7

Please sign in to comment.