-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
57 lines (39 loc) · 1.49 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
project(qt_vtk)
cmake_minimum_required(VERSION 2.8)
set (CMAKE_CXX_STANDARD 11)
set(VTK_DIR "C:/ProgramData/swissmeda/VTK-7.1.0-build")
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
set( CMAKE_AUTOMOC ON)
set( CMAKE_AUTOUIC ON )
find_package( Qt5Widgets REQUIRED ON )
include_directories( ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} )
SET( PSDK_PATH "C:/Program Files/Microsoft Platform SDK/Bin" )
SET( PSDK_INC "C:/Program Files/Microsoft Platform SDK/Include" )
FIND_PATH(DX9_INCLUDE_PATH d3d9.h
PATHS
"$ENV{DXSDK_DIR}/Include"
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Include"
DOC "The directory where D3D9.h resides")
FIND_LIBRARY(D3D9_LIBRARY d3d9.lib
PATHS
"$ENV{DXSDK_DIR}/Lib/x86"
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Lib/x86"
DOC "The directory where d3d9.lib resides")
FIND_LIBRARY(D3DX9_LIBRARY d3dx9.lib
PATHS
"$ENV{DXSDK_DIR}/Lib/x86"
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Lib/x86"
DOC "The directory where d3dx9.lib resides")
SET( DX9_LIBRARIES ${D3D9_LIBRARY} ${D3DX9_LIBRARY} )
set( SOURCES main.cpp
mainwindow.cpp
)
set( HEADERS mainwindow.h )
set( UI mainwindow.ui )
add_executable(${PROJECT_NAME} ${SOURCES} ${UI} ${HEADERS} )
qt5_use_modules( ${PROJECT_NAME} Core Gui )
target_link_libraries( ${PROJECT_NAME} ${VTK_LIBRARIES} )
target_link_libraries(${PROJECT_NAME} ${DX9_LIBRARIES} wbemuuid.lib)
# To run use arguments
# -DCMAKE_PREFIX_PATH=/home/oleh/Qt5.5.1/5.5/gcc_64 -DVTK_DIR=/home/oleh/VTK/build