Skip to content

Commit

Permalink
BSDFXMLParser connected through CMake only (Still not used by the code).
Browse files Browse the repository at this point in the history
  • Loading branch information
vidanovic committed Oct 18, 2024
1 parent b1790f6 commit b7a091f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,20 @@ if(NOT TARGET FileParse)
endif()

if(NOT TARGET BSDFXMLParser)
set(BUILD_BSDFXMLParser_tests OFF CACHE BOOL "Build BSDFXMLParser tests" FORCE)
set(BUILD_BSDFXMLParser_Tests OFF CACHE BOOL "Build BSDFXMLParser tests" FORCE)

FetchContent_Declare(
BSDFXMLParser
GIT_REPOSITORY https://github.com/LBNL-ETA/BSDFXMLParser.git
GIT_TAG "main"
)

FetchContent_MakeAvailable(FileParse)
FetchContent_MakeAvailable(BSDFXMLParser)
endif()

# Set include directories for FileParse
set(FileParse_INCLUDE_DIRS "${fileparse_SOURCE_DIR}/include")
include_directories(${FileParse_INCLUDE_DIRS})
set(BSDFXMLParser_INCLUDE_DIRS "${bsdfxmlparser_SOURCE_DIR}/src")
include_directories(${BSDFXMLParser_INCLUDE_DIRS})

# Add your target
add_subdirectory(src)
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ add_library( ${LIB_NAME}
target_link_libraries(${LIB_NAME} PRIVATE nlohmann_json::nlohmann_json)
target_link_libraries(${LIB_NAME} PRIVATE xmlParser)
target_link_libraries(${LIB_NAME} PRIVATE FileParse)
target_link_libraries(${LIB_NAME} PRIVATE BSDFXMLParser)

if(NOT "${fPIC}")
set(fPIC ON)
Expand Down

0 comments on commit b7a091f

Please sign in to comment.