Build only one of static or shared libraries
As discussed on the forums, to simplify the CMake code and avoid having to manually specify dependencies this removes the hack to allow both static and shared libraries to be built at the same time. It introduces the new variable LIBRARY_TYPE which can be either STATIC or DYNAMIC. See: http://www.volumesoffun.com/phpBB3/viewtopic.php?p=3203#p3203
This commit is contained in:
@ -19,13 +19,6 @@ if(ENABLE_BINDINGS)
|
||||
swig_add_module(PolyVoxCore python PolyVoxCore.i)
|
||||
swig_link_libraries(PolyVoxCore ${PYTHON_LIBRARIES} PolyVoxCore)
|
||||
#set_target_properties(${SWIG_MODULE_PolyVoxCore_REAL_NAME} PROPERTIES SUFFIX ".pyd")
|
||||
|
||||
if(ENABLE_STATIC_LIBRARIES)
|
||||
ADD_DEPENDENCIES(${SWIG_MODULE_PolyVoxCore_REAL_NAME} PolyVoxCoreStatic PolyVoxUtilStatic)
|
||||
endif()
|
||||
if(ENABLE_DYNAMIC_LIBRARIES)
|
||||
ADD_DEPENDENCIES(${SWIG_MODULE_PolyVoxCore_REAL_NAME} PolyVoxCoreDynamic PolyVoxUtilDynamic)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
set(BUILD_BINDINGS OFF CACHE BOOL "Will the bindings be built" FORCE)
|
||||
|
Reference in New Issue
Block a user