1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-08 14:17:06 +03:00

Samples - CMake configuration fix (#643)

- Migrates legacy text-based FILES, PACKAGES, and EXTERNLIB configuration files to proper CMake format (.cmake extensions)
- Updates CMakeLists.txt files to use modern CMake practices with explicit configurations and target-specific definitions
- Modifies the qt_macro.cmake to work with the new CMake variable-based file management system
This commit is contained in:
Pasukhin Dmitry
2025-07-25 10:38:48 +01:00
committed by GitHub
parent f41a5a91e4
commit e42a043abe
99 changed files with 433 additions and 309 deletions

View File

@@ -1,11 +1,18 @@
project(Tutorial)
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_sample)
# Sample configuration
set (EXECUTABLE_PROJECT ON)
set (USE_QT ON)
set (RELATIVE_DIR "samples/qt")
set (TARGET_FOLDER "Samples")
include_directories("${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE}/${RELATIVE_DIR}")
include_directories("${OCCT_ROOT_DIR}/${RELATIVE_DIR}/Interface/src")
include_directories("${OCCT_ROOT_DIR}/${RELATIVE_DIR}/Common/src")
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit)
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_sample)
ADD_DEFINITIONS(-DNO_COMMONSAMPLE_EXPORTS -DNO_IESAMPLE_EXPORTS)
# Target-specific definitions
target_compile_definitions(Tutorial PRIVATE -DNO_COMMONSAMPLE_EXPORTS -DNO_IESAMPLE_EXPORTS)

View File

@@ -1,26 +0,0 @@
TKBRep
TKBool
TKBO
TKCDF
TKFillet
TKG2d
TKG3d
TKGeomAlgo
TKGeomBase
TKernel
TKHLR
TKDEIGES
TKMath
TKMesh
TKOffset
TKOpenGl
TKPrim
TKService
TKShHealing
TKDESTEP
TKDESTL
TKTopAlgo
TKV3d
TKDEVRML
TKXSBase

View File

@@ -0,0 +1,28 @@
# External dependencies for Tutorial sample
set(OCCT_Tutorial_EXTERNAL_LIBS
TKBRep
TKBool
TKBO
TKCDF
TKFillet
TKG2d
TKG3d
TKGeomAlgo
TKGeomBase
TKernel
TKHLR
TKDEIGES
TKMath
TKMesh
TKOffset
TKOpenGl
TKPrim
TKService
TKShHealing
TKDESTEP
TKDESTL
TKTopAlgo
TKV3d
TKDEVRML
TKXSBase
)

View File

@@ -1,2 +0,0 @@
EXTERNLIB
PACKAGES

View File

@@ -0,0 +1,36 @@
# Source files for Tutorial sample
set(OCCT_Tutorial_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}")
set(OCCT_Tutorial_FILES
src/ApplicationTut.cxx
src/ApplicationTut.h
src/DocumentTut.cxx
src/DocumentTut.h
src/Main.cxx
src/MakeBottle.cxx
src/Tutorial-icon.ts
src/Tutorial-string.ts
../Common/src/ApplicationCommon.cxx
../Common/src/ApplicationCommon.h
../Common/src/Common-icon.ts
../Common/src/Common-string.ts
../Common/src/CommonSample.h
../Common/src/DocumentCommon.cxx
../Common/src/DocumentCommon.h
../Common/src/Material.cxx
../Common/src/Material.h
../Common/src/MDIWindow.cxx
../Common/src/MDIWindow.h
../Common/src/OcctWindow.cxx
../Common/src/OcctWindow.h
../Common/src/Transparency.cxx
../Common/src/Transparency.h
../Common/src/View.cxx
../Common/src/View.h
../Interface/src/Application.cxx
../Interface/src/Application.h
../Interface/src/IESample.h
../Interface/src/Interface-string.ts
../Interface/src/Translate.cxx
../Interface/src/Translate.h
)

View File

@@ -1,2 +0,0 @@
Tutorial/src
Common/src

View File

@@ -0,0 +1,4 @@
# Packages for Tutorial sample
set(OCCT_Tutorial_LIST_OF_PACKAGES
Tutorial
)

View File

@@ -1,8 +0,0 @@
ApplicationTut.cxx
ApplicationTut.h
DocumentTut.cxx
DocumentTut.h
Main.cxx
MakeBottle.cxx
Tutorial-icon.ts
Tutorial-string.ts