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:
@@ -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)
|
||||
|
||||
|
||||
|
@@ -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
|
||||
|
28
samples/qt/Tutorial/EXTERNLIB.cmake
Normal file
28
samples/qt/Tutorial/EXTERNLIB.cmake
Normal 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
|
||||
)
|
@@ -1,2 +0,0 @@
|
||||
EXTERNLIB
|
||||
PACKAGES
|
36
samples/qt/Tutorial/FILES.cmake
Normal file
36
samples/qt/Tutorial/FILES.cmake
Normal 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
|
||||
)
|
@@ -1,2 +0,0 @@
|
||||
Tutorial/src
|
||||
Common/src
|
4
samples/qt/Tutorial/PACKAGES.cmake
Normal file
4
samples/qt/Tutorial/PACKAGES.cmake
Normal file
@@ -0,0 +1,4 @@
|
||||
# Packages for Tutorial sample
|
||||
set(OCCT_Tutorial_LIST_OF_PACKAGES
|
||||
Tutorial
|
||||
)
|
@@ -1,8 +0,0 @@
|
||||
ApplicationTut.cxx
|
||||
ApplicationTut.h
|
||||
DocumentTut.cxx
|
||||
DocumentTut.h
|
||||
Main.cxx
|
||||
MakeBottle.cxx
|
||||
Tutorial-icon.ts
|
||||
Tutorial-string.ts
|
Reference in New Issue
Block a user