@@ -30,18 +30,17 @@ IF(MSVC OR ${CMAKE_GENERATOR} MATCHES "Xcode")
3030ENDIF ()
3131
3232MESSAGE (STATUS "Configuring PLUS toolkit version ${PLUSLIB_VERSION} ." )
33-
3433IF (MSVC OR ${CMAKE_GENERATOR } MATCHES "Xcode" )
35- IF ( ${ CMAKE_GENERATOR } MATCHES "Win64" )
36- SET (PLUSLIB_PLATFORM "Win64" CACHE STRING "Name of the platform this instance of PlusLib is built on" )
37- ELSE ( )
38- SET (PLUSLIB_PLATFORM "Win32" CACHE STRING "Name of the platform this instance of PlusLib is built on" )
34+ IF (CMAKE_SIZEOF_VOID_P EQUAL 8 )
35+ SET (PLUSLIB_PLATFORM "Win64" CACHE STRING "Name of the platform this instance of PlusLib is built on" FORCE )
36+ ELSEIF ( CMAKE_SIZEOF_VOID_P EQUAL 4 )
37+ SET (PLUSLIB_PLATFORM "Win32" CACHE STRING "Name of the platform this instance of PlusLib is built on" FORCE )
3938 ENDIF ()
4039ELSE ()
4140 IF (APPLE )
42- SET (PLUSLIB_PLATFORM "OSX" CACHE STRING "Name of the platform this instance of PlusLib is built on" )
41+ SET (PLUSLIB_PLATFORM "OSX" CACHE STRING "Name of the platform this instance of PlusLib is built on" FORCE )
4342 ELSE ()
44- SET (PLUSLIB_PLATFORM "Linux" CACHE STRING "Name of the platform this instance of PlusLib is built on" )
43+ SET (PLUSLIB_PLATFORM "Linux" CACHE STRING "Name of the platform this instance of PlusLib is built on" FORCE )
4544 ENDIF ()
4645ENDIF ()
4746
@@ -165,7 +164,7 @@ ENDIF()
165164
166165SET (PHIDGET_SPATIAL_BASE_DIR ${PLUSLIB_TOOLS_DIR} /Phidget/Phidget22)
167166SET (PHIDGET_SPATIAL_INCLUDE_DIR ${PHIDGET_SPATIAL_BASE_DIR} CACHE PATH "Path to the Phidget Spatial include folder" FORCE )
168- IF (MSVC AND ${CMAKE_GENERATOR } MATCHES "Win64" )
167+ IF (MSVC AND ${PLUSLIB_PLATFORM } MATCHES "Win64" )
169168 SET (PHIDGET_SPATIAL_LIB_DIR ${PHIDGET_SPATIAL_BASE_DIR} /x64 CACHE PATH "Path to the Phidget Spatial 64-bit lib folder" FORCE )
170169 SET (PHIDGET_SPATIAL_BINARY_DIR ${PHIDGET_SPATIAL_BASE_DIR} /x64 CACHE PATH "Path to the Phidget Spatial 64-bit dll folder" FORCE )
171170ELSE ()
@@ -183,7 +182,7 @@ ENDIF()
183182
184183SET (EPIPHAN_SDK_BASE_DIR ${PLUSLIB_TOOLS_DIR} /Epiphan)
185184SET (EPIPHAN_INCLUDE_DIR ${EPIPHAN_SDK_BASE_DIR} CACHE PATH "Path to the Epiphan SDK include directory." FORCE )
186- IF (MSVC AND ${CMAKE_GENERATOR } MATCHES "Win64" )
185+ IF (MSVC AND ${PLUSLIB_PLATFORM } MATCHES "Win64" )
187186 SET (EPIPHAN_BINARY_DIR ${EPIPHAN_SDK_BASE_DIR} /x64 CACHE PATH "Directory containing Epiphan shared library file." FORCE )
188187 SET (EPIPHAN_LIB_DIR ${EPIPHAN_SDK_BASE_DIR} /x64 CACHE PATH "Directory containing Epiphan static library file." FORCE )
189188ELSE ()
@@ -215,7 +214,7 @@ ENDIF()
215214IF (WIN32 )
216215 SET (NVIDIA_DVP_BASE_DIR ${PLUSLIB_TOOLS_DIR} /NVidia/dvp170)
217216 SET (NVIDIA_DVP_INCLUDE_DIR ${NVIDIA_DVP_BASE_DIR} /include CACHE PATH "Path to the NVidia DVP include directory." FORCE )
218- IF (MSVC AND ${CMAKE_GENERATOR } MATCHES "Win64" )
217+ IF (MSVC AND ${PLUSLIB_PLATFORM } MATCHES "Win64" )
219218 SET (NVIDIA_DVP_BINARY_DIR ${NVIDIA_DVP_BASE_DIR} /bin/x64 CACHE PATH "Directory containing NVidia DVP shared library file." FORCE )
220219 SET (NVIDIA_DVP_LIB_DIR ${NVIDIA_DVP_BASE_DIR} /lib/x64 CACHE PATH "Directory containing NVidia DVP static library file." FORCE )
221220 ELSE ()
0 commit comments