Files
Hoops_Exchange/exchange/exchangesource/CMakeLists.txt
2025-12-15 23:22:33 +08:00

84 lines
1.9 KiB
CMake

# Target added only to have the files available in Visual Studio
# I'm not setting correctly the include directory property to force samples to include using "../" as they are currently doing.
add_custom_target(HE_CommonHeaders)
target_sources(HE_CommonHeaders PRIVATE common.hpp)
#sample list
set(SAMPLE_LIST
BrepAdaptor
CascadedAttributes
Collision
CreatePRCBrepWithGeometry
CreatePRCCubes
DumpFeatureTree
ImportExport
IncrementalLoad
LoadMultiConfigCADFile
MultiplePRCFiles
PRC2IFCXML
PRC2XML
SewBrep
Shattered
)
if(NOT HOOPS_EXCHANGE_DISABLE_SAMPLES_VIEWER)
list(APPEND SAMPLE_LIST
Viewer
DrawingViewer
)
if(NOT APPLE)
list(APPEND SAMPLE_LIST
MeshViewer
)
endif()
endif()
if(WIN32)
list(APPEND SAMPLE_LIST
NetWrapper
)
endif()
if (HOOPS_BUILD_TranslateToPkParts)
find_package(Parasolid)
if (Parasolid_FOUND)
list(APPEND SAMPLE_LIST
TranslateToPkParts
)
endif()
endif()
foreach(SAMPLE ${SAMPLE_LIST})
add_subdirectory(${SAMPLE})
endforeach()
if(TARGET ConsoleApplication)
# Add the .NET ConsoleApplication sample out of subdirectory (build with NetWrapper)
list(APPEND SAMPLE_LIST
ConsoleApplication
)
endif()
add_custom_target(Sample_HOOPS_Exchange
DEPENDS ${SAMPLE_LIST}
)
set(SAMPLE_LIST_Exchange ${SAMPLE_LIST} PARENT_SCOPE)
# Add project folder for IDEs
set_target_properties(HE_CommonHeaders PROPERTIES FOLDER "Exchange")
set_target_properties(Sample_HOOPS_Exchange PROPERTIES FOLDER "Exchange")
foreach(SAMPLE ${SAMPLE_LIST})
set_target_properties(${SAMPLE} PROPERTIES FOLDER "Exchange/Samples")
endforeach()
if(TARGET copy_glut_shared)
set_target_properties(copy_glut_shared PROPERTIES FOLDER "Exchange/Samples")
endif()
if(TARGET NetWrapper)
set_target_properties(NetWrapper PROPERTIES FOLDER "Exchange/Samples/.Net Wrapper")
endif()
if(TARGET ConsoleApplication)
set_target_properties(ConsoleApplication PROPERTIES FOLDER "Exchange/Samples/.Net Wrapper")
endif()