Put the bindings CMake stuff in a separate directory to keep things clean
Fully remove the if(win32) stuff from the examples
This commit is contained in:
parent
ab331497d9
commit
1fb999966f
@ -40,7 +40,6 @@ SET(QT_USE_QTGUI 1)
|
|||||||
SET(QT_USE_QTOPENGL 1)
|
SET(QT_USE_QTOPENGL 1)
|
||||||
INCLUDE(${QT_USE_FILE})
|
INCLUDE(${QT_USE_FILE})
|
||||||
|
|
||||||
#IF (WIN32)
|
|
||||||
FIND_PACKAGE(OpenGL REQUIRED)
|
FIND_PACKAGE(OpenGL REQUIRED)
|
||||||
|
|
||||||
#NOTE: In Windows I haven't had much luck getting the FindGLUT script to work correctly.
|
#NOTE: In Windows I haven't had much luck getting the FindGLUT script to work correctly.
|
||||||
@ -64,5 +63,4 @@ INCLUDE(${QT_USE_FILE})
|
|||||||
COMPONENT example
|
COMPONENT example
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_DEPENDENCIES(OpenGLExample PolyVoxCore) #This shouldn't be needed
|
ADD_DEPENDENCIES(OpenGLExample PolyVoxCore) #This shouldn't be needed?
|
||||||
#ENDIF (WIN32)
|
|
||||||
|
@ -141,18 +141,4 @@ if(DOXYGEN_FOUND)
|
|||||||
add_custom_target(doc COMMAND ${DOXYGEN_EXECUTABLE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Building documentation" VERBATIM)
|
add_custom_target(doc COMMAND ${DOXYGEN_EXECUTABLE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Building documentation" VERBATIM)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(SWIG)
|
add_subdirectory(bindings)
|
||||||
if(SWIG_FOUND)
|
|
||||||
include(${SWIG_USE_FILE})
|
|
||||||
|
|
||||||
find_package(PythonLibs)
|
|
||||||
include_directories(${PYTHON_INCLUDE_PATH})
|
|
||||||
|
|
||||||
set(CMAKE_SWIG_FLAGS "")
|
|
||||||
set_source_files_properties(bindings/PolyVoxCore.i PROPERTIES CPLUSPLUS ON)
|
|
||||||
|
|
||||||
swig_add_module(PolyVoxCore python bindings/PolyVoxCore.i)
|
|
||||||
swig_link_libraries(PolyVoxCore ${PYTHON_LIBRARIES} PolyVoxCore)
|
|
||||||
set_target_properties(${SWIG_MODULE_PolyVoxCore_REAL_NAME} PROPERTIES SUFFIX ".pyd")
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
14
library/bindings/CMakeLists.txt
Normal file
14
library/bindings/CMakeLists.txt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
find_package(SWIG)
|
||||||
|
if(SWIG_FOUND)
|
||||||
|
include(${SWIG_USE_FILE})
|
||||||
|
|
||||||
|
find_package(PythonLibs)
|
||||||
|
include_directories(${PYTHON_INCLUDE_PATH})
|
||||||
|
|
||||||
|
set(CMAKE_SWIG_FLAGS "")
|
||||||
|
set_source_files_properties(bindings/PolyVoxCore.i PROPERTIES CPLUSPLUS ON)
|
||||||
|
|
||||||
|
swig_add_module(PolyVoxCore python bindings/PolyVoxCore.i)
|
||||||
|
swig_link_libraries(PolyVoxCore ${PYTHON_LIBRARIES} PolyVoxCore)
|
||||||
|
set_target_properties(${SWIG_MODULE_PolyVoxCore_REAL_NAME} PROPERTIES SUFFIX ".pyd")
|
||||||
|
endif()
|
Loading…
x
Reference in New Issue
Block a user