mireado

starting commit

english version
1 +# common.pri
2 +# DEFINES += _CRT_NON_CONFORMING_SWPRINTFS
3 +
4 +# config.pri
5 +# win32 {
6 +# DEFINES += _SECURE_SCL=0 _SCL_SECURE_NO_WARNINGS
7 +# DEFINES += _CRT_SECURE_NO_WARNINGS
8 +# QMAKE_CXXFLAGS += -wd4819
9 +# }
10 +
11 +# config.pri
12 +# win32 {
13 +# CONFIG(nocrt) {
14 +# message(CONFIG nocrt)
15 +# QMAKE_CFLAGS -= /MD /MDd
16 +# QMAKE_CFLAGS_DEBUG -= /MD /MDd
17 +# QMAKE_CFLAGS_RELEASE -= /MD /MDd
18 +# QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO -= /MD /MDd
19 +# QMAKE_CXXFLAGS -= /MD /MDd
20 +# QMAKE_CXXFLAGS_DEBUG -= /MD /MDd
21 +# QMAKE_CXXFLAGS_RELEASE -= /MD /MDd
22 +# QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO -= /MD /MDd
23 +# }
24 +# CONFIG(eha) {
25 +# message(CONFIG eha)
26 +# QMAKE_CXXFLAGS_STL_ON -= /EHsc
27 +# QMAKE_CXXFLAGS_EXCEPTIONS_ON -= /EHsc
28 +# QMAKE_CXXFLAGS_STL_ON += /EHa
29 +# QMAKE_CXXFLAGS_EXCEPTIONS_ON += /EHa
30 +# }
31 +# CONFIG(noeh) {
32 +# message(CONFIG noeh)
33 +# QMAKE_CXXFLAGS += /GR-
34 +# QMAKE_CXXFLAGS_RTTI_ON -= /GR
35 +# QMAKE_CXXFLAGS_STL_ON -= /EHsc
36 +# QMAKE_CXXFLAGS_EXCEPTIONS_ON -= /EHsc
37 +# CONFIG(dll) {
38 +# QMAKE_LFLAGS += /ENTRY:"DllMain"
39 +# }
40 +# }
41 +# CONFIG(nosafeseh) {
42 +# message(CONFIG nosafeseh)
43 +# QMAKE_LFLAGS += -safeseh:no
44 +# }
45 +# }
46 +
47 +# dllconfig.pri
48 +# win32 {
49 +# CONFIG(eh): DEFINES += ITH_HAS_SEH
50 +# CONFIG(noeh): DEFINES -= ITH_HAS_SEH
51 +# }
52 +
53 +cmake_minimum_required(VERSION 2.8)
54 +
55 +set(CMAKE_CONFIGURATION_TYPES Debug Release)
56 +
57 +project(ITHVNR)
58 +
59 +set(WDK_HOME "C:\\WinDDK\\7600.16385.1" CACHE FILEPATH "Windows Driver Kit path")
60 +set(CMAKE_INSTALL_PREFIX "" CACHE FILEPATH "installation path")
61 +
62 +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/Debug")
63 +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/Release")
64 +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/Debug")
65 +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/Release")
66 +
67 +set(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION ON)
68 +
69 +set(CPACK_GENERATOR "ZIP")
70 +set(CPACK_PACKAGE_VERSION_MAJOR 3)
71 +set(CPACK_PACKAGE_VERSION_MINOR 4152)
72 +set(CPACK_PACKAGE_VERSION_PATCH 0)
73 +set(CPACK_SOURCE_GENERATOR "ZIP")
74 +set(CPACK_SOURCE_IGNORE_FILES "/CVS/;/\\\\.svn/;/\\\\.bzr/;/\\\\.hg/;/\\\\.git/;\\\\.swp$;\\\\.#;/#" ".*\\\\.user$" "\\\\.gitignore$" "\\\\.gitmodules$" "\\\\.git$")
75 +include(CPack)
76 +
77 +add_compile_options(
78 + #/Zc:auto # config.pri
79 + /wd4819 # config.pri
80 + /MP
81 + /GS-
82 +# $<$<CONFIG:Release>:/MT>
83 +# $<$<CONFIG:Debug>:/MTd>
84 +)
85 +
86 +add_definitions(
87 + -D_SECURE_SCL=0 # config.pri
88 + -D_SCL_SECURE_NO_WARNINGS # config.pri
89 + -D_CRT_SECURE_NO_WARNINGS # config.pri
90 + -DUNICODE # config.pri
91 + -D_UNICODE
92 + -D_CRT_NON_CONFORMING_SWPRINTFS # common.pri
93 + -DITH_HAS_CRT
94 +)
95 +
96 +include_directories(${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/vnr ${CMAKE_BINARY_DIR}/gui)
97 +
98 +set(common_src
99 + vnr/ith/common/const.h
100 + vnr/ith/common/defs.h
101 + vnr/ith/common/except.h
102 + vnr/ith/common/growl.h
103 + vnr/ith/common/memory.h
104 + vnr/ith/common/types.h
105 +)
106 +
107 +set(resource_src
108 + gui/ITHVNR.rc
109 + gui/icon1.ico
110 +)
111 +
112 +set(ithvnr_src
113 + gui/command.cpp
114 + gui/CustomFilter.cpp
115 + gui/CustomFilter.h
116 + gui/ITH.h
117 + gui/language.cpp
118 + gui/language.h
119 + gui/main.cpp
120 + gui/ProcessWindow.cpp
121 + gui/ProcessWindow.h
122 + gui/Profile.cpp
123 + gui/Profile.h
124 + gui/ProfileManager.cpp
125 + gui/ProfileManager.h
126 + gui/pugiconfig.hpp
127 + gui/pugixml.cpp
128 + gui/pugixml.hpp
129 + gui/resource.h
130 + gui/utility.cpp
131 + gui/utility.h
132 + ${CMAKE_BINARY_DIR}/gui/version.h
133 + gui/version.h.in
134 + gui/window.cpp
135 + gui/window.h
136 + gui/TextBuffer.cpp
137 + gui/TextBuffer.h
138 + ${common_src}
139 + ${resource_src}
140 +)
141 +
142 +source_group("common" FILES ${common_src})
143 +
144 +source_group("Resource Files" FILES ${resource_src})
145 +
146 +add_executable(${PROJECT_NAME} ${ithvnr_src})
147 +
148 +add_subdirectory(vnr)
149 +
150 +set_target_properties(${PROJECT_NAME} PROPERTIES
151 + LINK_FLAGS "/SUBSYSTEM:WINDOWS /MANIFESTDEPENDENCY:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\""
152 +)
153 +
154 +target_compile_definitions(${PROJECT_NAME}
155 + PRIVATE
156 + PSAPI_VERSION=1
157 + DEFAULT_MM
158 +)
159 +
160 +target_link_libraries(${PROJECT_NAME}
161 + vnrhost
162 + vnrsys
163 + ${WDK_HOME}/lib/wxp/i386/ntdll.lib
164 + comctl32.lib
165 + psapi.lib
166 +)
167 +
168 +target_compile_options(${PROJECT_NAME}
169 + PRIVATE
170 + /EHsc
171 +)
172 +
173 +install(TARGETS ${PROJECT_NAME}
174 + DESTINATION .
175 + CONFIGURATIONS Release
176 +)
177 +
178 +configure_file(gui/version.h.in gui/version.h)