Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] external libraries support. #573

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,13 @@ ENDIF (NOT BISON_NOT_AVAILABLE)
IF (NOT FLEX_NOT_AVAILABLE)
find_package(FLEX)
ENDIF (NOT FLEX_NOT_AVAILABLE)

# Find OpenVDB
if(NOT USE_BUNDLE_OPENVDB)
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)
# preserve Boost_LIBRARIES
set(save_Boost_LIBRARIES ${Boost_LIBRARIES})
find_package(OpenVDB REQUIRED)
set(Boost_LIBRARIES ${save_Boost_LIBRARIES})
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG FALSE)
endif()
1 change: 0 additions & 1 deletion src/luxcore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ set(PYLUXCORE_SRCS

add_library(pyluxcore MODULE ${PYLUXCORE_SRCS} ${LUXCORE_LIB_SRCS} ${LUX_PARSER_SRC})

include_directories(${LuxRays_SOURCE_DIR}/deps/openvdb-7.0.0)
include_directories(${LuxRays_SOURCE_DIR}/deps/opencolorio-2.0.0/include)

add_definitions(-DOPENVDB_STATICLIB ${VISIBILITY_FLAGS})
Expand Down
13 changes: 10 additions & 3 deletions src/slg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,19 @@ set(OPENVDB_SRCS

SOURCE_GROUP("Source Files\\OpenVDB Library" FILES ${OPENVDB_SRCS})

include_directories(${LuxRays_SOURCE_DIR}/deps/openvdb-7.0.0)

# Required by OpenVDB to read ABI 3
#add_definitions("-D OPENVDB_USE_DEPRECATED_ABI -DOPENVDB_3_ABI_COMPATIBLE -DOPENVDB_STATICLIB -DOPENVDB_OPENEXR_STATICLIB")
add_definitions("-DOPENVDB_USE_BLOSC -DOPENVDB_STATICLIB -DOPENVDB_OPENEXR_STATICLIB")
add_library(openvdb STATIC ${OPENVDB_SRCS})
if(USE_BUNDLE_OPENVDB)
add_library(openvdb STATIC ${OPENVDB_SRCS})
set_target_properties(openvdb INCLUDE_DIRECTORIES ${LuxRays_SOURCE_DIR}/deps/openvdb-7.0.0)
else()
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)
find_package(OpenVDB REQUIRED)
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG FALSE)
add_library(openvdb INTERFACE)
target_link_libraries(openvdb INTERFACE OpenVDB::openvdb)
endif()

###########################################################################
#
Expand Down