Skip to content

Commit

Permalink
Visual Studio and Windows fixes
Browse files Browse the repository at this point in the history
IlmBase: Fix IF/ELSEIF clause (WIN32 only)
PyImath: Install *.h in 'include' dir
PyImathNumpy: Change python library filename to 'imathnumpy.pyd' (WIN32 only)
  • Loading branch information
LiamGFX authored and nickrasmussen committed Aug 8, 2018
1 parent 31e1ae8 commit 4cfefea
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion IlmBase/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ ENDIF ()

IF (FORCE_CXX03)
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/IlmBaseConfig.h "#define ILMBASE_FORCE_CXX03 1\n" )
ELIF (NOT WIN32)
ELSEIF (NOT WIN32)
# really only care about c++11 right now for the threading bits, but this can be changed to 14
# when needed...
# Note that the __cplusplus check is not valid under MSVC
Expand Down
5 changes: 5 additions & 0 deletions PyIlmBase/PyImath/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ INSTALL ( TARGETS PyImath
lib
)

INSTALL (DIRECTORY ./
DESTINATION include
FILES_MATCHING PATTERN "*.h"
)

ADD_LIBRARY ( imathmodule ${LIB_TYPE}
imathmodule.cpp
PyImathFun.cpp
Expand Down
15 changes: 12 additions & 3 deletions PyIlmBase/PyImathNumpy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,18 @@ ADD_LIBRARY ( imathnumpymodule ${LIB_TYPE}
imathnumpymodule.cpp
)

SET_TARGET_PROPERTIES ( imathnumpymodule
PROPERTIES PREFIX "" SUFFIX ".so" BUILD_WITH_INSTALL_RPATH ON
)
IF (WIN32)
SET_TARGET_PROPERTIES (imathnumpymodule
PROPERTIES
PREFIX ""
OUTPUT_NAME "imathnumpy"
SUFFIX ".pyd"
)
ELSE ()
SET_TARGET_PROPERTIES (imathnumpymodule
PROPERTIES PREFIX "" SUFFIX ".so" BUILD_WITH_INSTALL_RPATH ON
)
ENDIF ()

INCLUDE_DIRECTORIES (
${NUMPY_INCLUDE_DIRS}
Expand Down

0 comments on commit 4cfefea

Please sign in to comment.