4
|
1 cmake_minimum_required(VERSION 2.6)
|
1
|
2 PROJECT(qtd CXX C)
|
|
3 FIND_PACKAGE(Qt4 REQUIRED)
|
|
4
|
7
|
5 ##--------------------------------------------
|
|
6 ## Settings.
|
|
7 ##--------------------------------------------
|
|
8
|
5
|
9 include_directories(${QT_INCLUDES} include ${CMAKE_CURRENT_BINARY_DIR}/include)
|
1
|
10
|
7
|
11 ## Options.
|
4
|
12 option(BUILD_QT_OPENGL "Build QtOpenGL" "ON")
|
|
13 option(BUILD_EXAMPLES "Build examples" "ON")
|
|
14
|
7
|
15 ## Packages list.
|
|
16 set(packages_big Core Gui)
|
4
|
17 if(BUILD_QT_OPENGL)
|
7
|
18 set(packages_big ${packages_big} OpenGL)
|
4
|
19 endif(BUILD_QT_OPENGL)
|
|
20
|
|
21 set(packages)
|
|
22 foreach(package ${packages_big})
|
|
23 string(TOLOWER ${package} package)
|
|
24 set(packages ${packages} ${package})
|
|
25 endforeach(package ${packages_big})
|
|
26
|
7
|
27 ## Find D compiler and parsing its version.
|
4
|
28 find_program(DC dmd ldc)
|
|
29 if (DC)
|
|
30 exec_program(${DC} ARGS "" OUTPUT_VARIABLE d_output)
|
|
31 string(REGEX MATCH "Digital Mars D Compiler v[0-9]\\.[0-9]+" dmd_version "${d_output}")
|
|
32 if (dmd_version)
|
|
33 set(D_IS_MARS true)
|
|
34 set(D_COMPILER_NAME "Digital Mars D Compiler")
|
|
35 string(REGEX REPLACE "Digital Mars D Compiler v([0-9])\\.[0-9]+" "\\1" D_VERSION "${dmd_version}")
|
|
36 string(REGEX REPLACE "Digital Mars D Compiler v[0-9]\\.([0-9]+)" "\\1" D_FRONTEND "${dmd_version}")
|
|
37 else (dmd_version)
|
|
38 string(REGEX MATCH "LLVM-based D Compiler" is_ldc "${d_output}")
|
|
39 if (is_ldc)
|
|
40 exec_program(${DC} ARGS "--version" OUTPUT_VARIABLE d_output)
|
|
41 string(REGEX MATCH "based on DMD v[0-9]\\.[0-9]+ and llvm [0-9]\\.[0-9]+" ldc_version "${d_output}")
|
|
42 set(D_IS_LLVM true)
|
|
43 if(ldc_version)
|
|
44 set(D_IS_LLVM true)
|
|
45 set(D_COMPILER_NAME "LLVM-based D Compiler")
|
|
46 string(REGEX REPLACE "based on DMD v([0-9])\\.[0-9]+ and llvm [0-9]\\.[0-9]+" "\\1" D_VERSION "${ldc_version}")
|
|
47 string(REGEX REPLACE "based on DMD v[0-9]\\.([0-9]+) and llvm [0-9]\\.[0-9]+" "\\1" D_FRONTEND "${ldc_version}")
|
|
48 else(ldc_version)
|
|
49 message(FATAL_ERROR "LDC compiler was found, but the version can not be processed")
|
|
50 endif(ldc_version)
|
|
51 else (is_ldc)
|
|
52 message(FATAL_ERROR "D compliler not founded")
|
|
53 endif(is_ldc)
|
|
54 endif(dmd_version)
|
|
55 message(STATUS "D compiler founded -- ${D_COMPILER_NAME} v${D_VERSION}.${D_FRONTEND}")
|
|
56 else (DC)
|
|
57 message(FATAL_ERROR "D compliler not founded")
|
|
58 endif (DC)
|
|
59
|
7
|
60 if(D_IS_MARS)
|
|
61 option(COMBINED_OBJECT_FILE "Build all d sources to one object file" "ON")
|
|
62 elseif(D_IS_LLVM)
|
|
63 option(COMBINED_OBJECT_FILE "Build all d sources to one object file" "OFF")
|
|
64 endif(D_IS_MARS)
|
|
65
|
4
|
66 # Check D compiler version
|
|
67 if(D_VERSION EQUAL "1")
|
|
68 if (D_FRONTEND LESS "041")
|
|
69 message(STATUS "Minimum required version of D compiler is 1.041 (or compiler based on this version)")
|
|
70 endif(D_FRONTEND LESS "041")
|
|
71 set(D_TARGET d1-tango)
|
|
72 elseif(D_VERSION EQUAL "2")
|
|
73 set(D_TARGET ) ## TODO: hm... I don`t known this parameter for D2 ^(
|
|
74 endif(D_VERSION EQUAL "1")
|
|
75
|
|
76 # Debug and release flags.
|
|
77 if (${CMAKE_BUILD_TYPE} MATCHES [dD][eE][bB][uU][gG])
|
|
78 #set(CMAKE_BUILD_TYPE Debug)
|
|
79 #set( SUFFIXLIB "${SUFFIXLIB}-debug" )
|
|
80 #set( SUFFIXBIN "${SUFFIXBIN}-debug" )
|
|
81 add_definitions(-DDEBUG)
|
|
82 set(D_FLAGS -g -gc -debug)
|
|
83 else (${CMAKE_BUILD_TYPE} MATCHES [dD][eE][bB][uU][gG])
|
|
84 #set(CMAKE_BUILD_TYPE Release)
|
|
85 add_definitions(-UNO_DEBUG)
|
|
86 set(D_FLAGS -O -release -inline)
|
|
87 if(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
|
|
88 set(D_FLAGS ${D_FLAGS} -L/subsystem:windows)
|
|
89 endif(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
|
|
90 endif (${CMAKE_BUILD_TYPE} MATCHES [dD][eE][bB][uU][gG])
|
|
91 set(D_FLAGS ${D_FLAGS} -I${CMAKE_BINARY_DIR} -I${CMAKE_SOURCE_DIR})
|
7
|
92 if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL Windows AND NOT D_IS_MARS)
|
|
93 set(D_FLAGS ${D_FLAGS} -L-L${CMAKE_BINARY_DIR}/lib)
|
|
94 endif(NOT ${CMAKE_SYSTEM_NAME} STREQUAL Windows AND NOT D_IS_MARS)
|
4
|
95
|
|
96
|
|
97 if(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
|
|
98 set(implib implib)
|
|
99 find_program(IMPLIB ${implib})
|
|
100 if (NOT IMPLIB)
|
|
101 message(FATAL_ERROR "implib not found. You can donwload it from http://ftp.digitalmars.com/bup.zip")
|
|
102 endif (NOT IMPLIB)
|
|
103 set(D_OBJECT_SUFFIX .obj)
|
|
104 if(D_IS_MARS)
|
|
105 set(D_LIB_SUFFIX .lib)
|
|
106 set(D_LIB_PREFIX )
|
|
107 elseif(D_IS_LDC)
|
|
108 set(D_LIB_SUFFIX .a)
|
|
109 set(D_LIB_PREFIX lib)
|
|
110 endif(D_IS_MARS)
|
|
111 set(GEN_OPT ${GEN_OPT} --cpp_shared)
|
|
112 add_definitions(-DCPP_SHARED)
|
7
|
113 string(REGEX REPLACE ".dll([A-Za-z\\.0-9]+)" "\\1" CMAKE_IMPORT_LIBRARY_SUFFIX "${CMAKE_IMPORT_LIBRARY_SUFFIX}")
|
4
|
114 elseif(${CMAKE_SYSTEM_NAME} STREQUAL Linux)
|
|
115 set(D_LIB_SUFFIX .a)
|
|
116 set(D_LIB_PREFIX lib)
|
|
117 set(D_OBJECT_SUFFIX .o)
|
|
118 endif(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
|
|
119
|
|
120 set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ./)
|
|
121 set(GEN_OPT ${GEN_OPT} --d-target=${D_TARGET})
|
|
122
|
7
|
123 ##--------------------------------------------
|
|
124 ## Macroses and functions.
|
|
125 ##--------------------------------------------
|
4
|
126
|
7
|
127 ## Make native path.
|
|
128 ## Usage:
|
|
129 ## set(path c:/file_path/file_name.cpp)
|
|
130 ## make_native_path(path)
|
|
131 ## message(STATUS ${path})
|
|
132 ## Output:
|
|
133 ## -- "c:\file_path\file_name.cpp"
|
|
134 ## Command "file(TO_NATIVE_PATH ...)" is wrong on Windows
|
|
135 macro(MAKE_NATIVE_PATH pathname)
|
|
136 if(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
|
|
137 # An extra \\ escape is necessary to get a \ through CMake's processing.
|
|
138 string(REPLACE "/" "\\" ${pathname} "${${pathname}}")
|
|
139 # Enclose with UNESCAPED quotes. This means we need to escape our
|
|
140 # quotes once here, i.e. with \"
|
|
141 set(${pathname} \"${${pathname}}\")
|
|
142 endif(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
|
|
143 endmacro(MAKE_NATIVE_PATH)
|
|
144
|
|
145 ## Remove unnecessary travel to the object file.
|
|
146 ## path -- path to object file.
|
|
147 ## Example:
|
|
148 ## set(path ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/target.dir/main.d.obj)
|
|
149 ## obj_path(path)
|
|
150 ## message(STATUS ${path})
|
|
151 ## Example output:
|
|
152 ## -- CMakeFiles/target.dir/main.d.obj
|
4
|
153 macro(OBJ_PATH path)
|
|
154 unset(test)
|
|
155 string(REGEX MATCH "${CMAKE_CURRENT_BINARY_DIR}/.*" test "${${path}}")
|
|
156 if(NOT ${test} EQUAL "")
|
|
157 string(LENGTH "${CMAKE_CURRENT_BINARY_DIR}" first)
|
|
158 string(LENGTH "${${path}}" last)
|
|
159 math(EXPR first "${first} + 1")
|
|
160 math(EXPR len "${last} - ${first}")
|
|
161 string(SUBSTRING "${${path}}" ${first} ${len} ${path})
|
|
162 else(NOT ${test} EQUAL "")
|
|
163 string(REGEX MATCH "${CMAKE_CURRENT_SOURCE_DIR}/.*" test "${${path}}")
|
|
164 if(NOT ${test} EQUAL "")
|
|
165 string(LENGTH "${CMAKE_CURRENT_SOURCE_DIR}" first)
|
|
166 string(LENGTH "${${path}}" last)
|
|
167 math(EXPR first "${first} + 1")
|
|
168 math(EXPR len "${last} - ${first}")
|
|
169 string(SUBSTRING "${${path}}" ${first} ${len} ${path})
|
|
170 endif(NOT ${test} EQUAL "")
|
|
171 endif(NOT ${test} EQUAL "")
|
|
172 endmacro(OBJ_PATH)
|
|
173
|
7
|
174
|
|
175 ## Compile d files.
|
|
176 ## target -- name of a new target.
|
|
177 ## objects_list -- created object files.
|
|
178 ## params -- sources files.
|
4
|
179 macro(compile_d_files target objects_list)
|
|
180 unset(${objects_list})
|
|
181 set(tmp_dir ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${target}.dir)
|
|
182 file(MAKE_DIRECTORY ${tmp_dir})
|
7
|
183 if(NOT COMBINED_OBJECT_FILE)
|
|
184 foreach (d_source_p ${ARGN})
|
|
185 ## TODO: why find_file command work wrong?
|
|
186 find_file(d_source_p ${d_source_p} PATHS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
|
|
187 ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR})
|
|
188 set (d_source ${d_source_p})
|
|
189 obj_path(d_source)
|
4
|
190 set(d_obj ${tmp_dir}/${d_source}${D_OBJECT_SUFFIX})
|
7
|
191 set(${objects_list} ${${objects_list}} ${d_obj})
|
4
|
192 get_filename_component(path ${d_obj} PATH)
|
|
193 file(MAKE_DIRECTORY ${path})
|
|
194 set(d_obj_out ${d_obj})
|
7
|
195 obj_path(d_obj_out)
|
4
|
196 add_custom_command(OUTPUT "${d_obj}"
|
|
197 COMMAND "${DC}"
|
7
|
198 ARGS ${D_FLAGS} -c ${d_source_p} -of${d_obj}
|
4
|
199 COMMENT "Building ${d_obj_out}"
|
7
|
200 DEPENDS ${d_source_p}
|
|
201 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
4
|
202 )
|
7
|
203 endforeach(d_source_p)
|
|
204 else(NOT COMBINED_OBJECT_FILE)
|
4
|
205 set(${objects_list} ${tmp_dir}/${target}${D_OBJECT_SUFFIX})
|
|
206 set(d_obj_out ${${objects_list}})
|
7
|
207 obj_path(d_obj_out)
|
4
|
208 set(parameters_list_file ${tmp_dir}/parameters)
|
7
|
209 set(parameters ${D_FLAGS} -c ${ARGN} -of${${objects_list}})
|
|
210 file(REMOVE ${parameters_list_file})
|
|
211 foreach(arg ${parameters})
|
|
212 file(APPEND ${parameters_list_file} "${arg}\n")
|
|
213 endforeach(arg)
|
4
|
214 add_custom_command(OUTPUT "${${objects_list}}"
|
|
215 COMMAND "${DC}"
|
|
216 ARGS @${parameters_list_file}
|
|
217 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
218 DEPENDS ${ARGN}
|
|
219 COMMENT ""
|
|
220 )
|
7
|
221 endif(NOT COMBINED_OBJECT_FILE)
|
|
222 add_custom_target(${target} DEPENDS "${${objects_list}}")
|
4
|
223 endmacro(compile_d_files objects_list)
|
|
224
|
7
|
225 ## Build example macro.
|
|
226 ## name -- example name.
|
|
227 ## Options:
|
|
228 ## PACKAGES -- list of packages to link to exaple (for example, QtCore QtGui QtOpenGL).
|
|
229 ## Default value is "QtCore QtGui".
|
|
230 ## params -- sources d files.
|
|
231 ## Usage:
|
|
232 ## build_example(ExampleName PACKAGES QtCore QtGui QtXml main.d another_d_file.d)
|
4
|
233 macro(build_example name)
|
|
234 unset(is_sources)
|
|
235 unset(is_libs)
|
|
236 set(qtd_libs ${core_lib_param} ${gui_lib_param})
|
|
237 foreach(param ${ARGN})
|
|
238 if(is_libs)
|
|
239 string(REGEX REPLACE "Qt([A-Za-z0-9])" "\\1" param_package "${param}")
|
|
240 if(${param_package} STREQUAL ${param})
|
|
241 unset(is_libs)
|
|
242 set(is_sources 1)
|
|
243 else(${param_package} STREQUAL ${param})
|
|
244 unset(is_founded)
|
|
245 foreach(package_big ${packages_big})
|
|
246 string(TOLOWER ${package_big} package)
|
|
247 if(${param_package} STREQUAL ${package_big})
|
|
248 set(qtd_libs ${qtd_libs} ${${package}_lib_param})
|
|
249 set(is_founded 1)
|
|
250 break(package_big ${packages_big})
|
|
251 endif(${param_package} STREQUAL ${package_big})
|
|
252 endforeach(package_big ${packages_big})
|
|
253 if(NOT is_founded)
|
|
254 message(STATUS "Module ${param_package} not founded for example ${name}")
|
|
255 return(build_example name)
|
|
256 endif(NOT is_founded)
|
|
257 endif(${param_package} STREQUAL ${param})
|
|
258 endif(is_libs)
|
|
259 if(NOT is_libs)
|
|
260 if(NOT is_sources)
|
|
261 if(${param} STREQUAL PACKAGES)
|
|
262 set(is_libs 1)
|
|
263 set(qtd_libs)
|
|
264 else(${param} STREQUAL PACKAGES)
|
|
265 set(is_sources 1)
|
|
266 endif(${param} STREQUAL PACKAGES)
|
|
267 endif(NOT is_sources)
|
|
268 if(is_sources)
|
|
269 set(sources ${sources} ${param})
|
|
270 endif(is_sources)
|
|
271 endif(NOT is_libs)
|
|
272 endforeach(param ${ARGN})
|
|
273 compile_d_files(${name}_dobjs objects ${sources} )
|
|
274 set(output ${CMAKE_CURRENT_BINARY_DIR}/${name}${CMAKE_EXECUTABLE_SUFFIX})
|
|
275 set(output_native ${output})
|
7
|
276 make_native_path(output_native)
|
|
277 ## Bug fix: Reverse libs for ldc.
|
|
278 if(D_IS_LLVM)
|
|
279 set(qtd_libs_tmp ${qtd_libs})
|
|
280 unset(qtd_libs)
|
|
281 foreach(libs ${qtd_libs_tmp})
|
|
282 set(qtd_libs ${libs} ${qtd_libs})
|
|
283 endforeach(libs ${qtd_libs_tmp})
|
|
284 endif(D_IS_LLVM)
|
|
285
|
4
|
286 add_custom_command(OUTPUT "${output}"
|
|
287 COMMAND "${DC}"
|
|
288 ARGS ${D_FLAGS} ${libs_path} ${qtd_libs} ${objects}
|
|
289 -of${output_native}
|
|
290 DEPENDS ${objects}
|
|
291 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
292 COMMENT "Building example ${name}"
|
|
293 )
|
|
294 add_custom_target(example_${name} ALL DEPENDS "${output}")
|
|
295 add_dependencies(example_${name} allpackages)
|
|
296 endmacro(build_example sources)
|
|
297
|
7
|
298 ##--------------------------------------------
|
|
299 ## Build library.
|
|
300 ##--------------------------------------------
|
|
301 add_subdirectory(generator)
|
|
302 file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|
303 add_custom_target(allpackages ALL)
|
|
304 link_directories(${CMAKE_BINARY_DIR}/CMakeFiles)
|
|
305
|
|
306 foreach(package_big ${packages_big})
|
|
307 string(TOLOWER ${package_big} package)
|
|
308 ## Loading settings for package.
|
|
309 unset(d_objs)
|
|
310 unset(cpp_objs)
|
|
311 unset(d_sources)
|
|
312 unset(cpp_sources)
|
|
313 unset(lib_name)
|
|
314 unset(link_cpp)
|
|
315 unset(link_d)
|
|
316 unset(cpp_files)
|
|
317 unset(d_files)
|
|
318 unset(classes)
|
|
319 unset(d_generated_files)
|
|
320 unset(link_example)
|
|
321 include (${CMAKE_SOURCE_DIR}/build/${package}.txt)
|
|
322
|
|
323 ## Loading package sources list.
|
|
324 foreach(d_source ${d_files})
|
|
325 set(d_sources ${d_sources} ${CMAKE_SOURCE_DIR}/qt/${d_source}.d)
|
|
326 endforeach(d_source)
|
|
327 foreach(d_source ${d_generated_files})
|
|
328 set(d_sources ${d_sources} ${CMAKE_BINARY_DIR}/qt/${d_source}.d)
|
|
329 endforeach(d_source)
|
|
330 foreach (cpp_source ${cpp_files})
|
|
331 set(cpp_sources ${cpp_sources} ${CMAKE_SOURCE_DIR}/cpp/${cpp_source}.cpp)
|
|
332 endforeach(cpp_source)
|
|
333 set(classes ArrayOps ${classes})
|
|
334 foreach(class ${classes})
|
|
335 set(d_sources ${d_sources} ${CMAKE_BINARY_DIR}/qt/${package}/${class}.d)
|
|
336 set(cpp_sources ${cpp_sources} ${CMAKE_BINARY_DIR}/cpp/qt_${package}/${class}_shell.cpp)
|
|
337 endforeach(class)
|
|
338 add_sources_for_generating(${cpp_sources})
|
|
339
|
|
340 ## Link CPP library.
|
|
341 set(lib_name ${D_LIB_PREFIX}qtd${package}${D_LIB_SUFFIX})
|
|
342 add_library(cpp_${package} SHARED ${cpp_sources})
|
|
343
|
|
344 ## Link D library.
|
|
345 compile_d_files(${package}_dobjs objects ${d_sources})
|
|
346 set(d_objs ${d_objs} ${objects})
|
|
347 if(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
|
|
348 set_property(TARGET cpp_${package} PROPERTY RUNTIME_OUTPUT_DIRECTORY lib)
|
|
349 set_property(TARGET cpp_${package} PROPERTY ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles)
|
|
350 target_link_libraries(cpp_${package} ${link_cpp} )
|
|
351 set(cpp_lib ${CMAKE_BINARY_DIR}/lib/libcpp_${package}.dll)
|
|
352 set(cpp_lib_native ${cpp_lib})
|
|
353 make_native_path(cpp_lib_native)
|
|
354 set(d_implib ${CMAKE_BINARY_DIR}/CMakeFiles/${package}.dir/cpp_${package}.lib)
|
|
355 set(d_implib_native ${d_implib})
|
|
356 make_native_path(d_implib_native)
|
|
357 add_custom_command(
|
|
358 OUTPUT "${d_implib}"
|
|
359 COMMAND "${IMPLIB}"
|
|
360 ARGS /system /PAGESIZE:32 ${d_implib_native} ${cpp_lib_native}
|
|
361 DEPENDS "cpp_${package}"
|
|
362 COMMENT "Creating implib ${lib_name}"
|
|
363 )
|
|
364 add_custom_command(
|
|
365 OUTPUT "${lib_name}"
|
|
366 COMMAND "${DC}"
|
|
367 ARGS -lib ${d_objs} ${d_implib} -oflib/${lib_name}
|
|
368 DEPENDS ${d_objs} ${d_implib}
|
|
369 COMMENT "Linking ${lib_name}"
|
|
370 )
|
|
371 else(${CMAKE_SYSTEM_NAME} STREQUAL Linux)
|
|
372 set_property(TARGET cpp_${package} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles)
|
|
373 foreach(cpp_source ${cpp_sources})
|
|
374 set(cpp_source ${cpp_source})
|
|
375 obj_path(cpp_source)
|
|
376 set(cpp_objs ${cpp_objs} CMakeFiles/cpp_${package}.dir/${cpp_source}.o)
|
|
377 endforeach(cpp_source)
|
|
378 add_custom_command(
|
|
379 OUTPUT "${lib_name}"
|
|
380 COMMAND "${CMAKE_AR}"
|
|
381 ARGS rcs lib/${lib_name} ${d_objs} ${cpp_objs}
|
|
382 DEPENDS ${d_objs} cpp_${package}
|
|
383 COMMENT "Linking ${lib_name}"
|
|
384 )
|
|
385 endif(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
|
|
386
|
|
387 ## Dependences.
|
|
388 add_dependencies(cpp_${package} dgen)
|
|
389 add_custom_target(${package} DEPENDS ${lib_name})
|
|
390 foreach(depend ${depends})
|
|
391 add_dependencies(cpp_${package} cpp_${depend})
|
|
392 add_dependencies(${package} ${depend})
|
|
393 endforeach(depend ${depends})
|
|
394 add_dependencies(allpackages ${package})
|
|
395 set(depends ${depends} ${package})
|
|
396
|
|
397 ## Paths for QtD libs. Needed by examples.
|
|
398 if(${CMAKE_SYSTEM_NAME} STREQUAL Windows AND D_IS_MARS)
|
|
399 set(libs_path ${CMAKE_BINARY_DIR}/lib/qtd${package}.lib)
|
|
400 make_native_path(libs_path)
|
|
401 set(${package}_lib_param -L+${libs_path})
|
|
402 foreach(link ${link_example})
|
|
403 set(link ${CMAKE_SOURCE_DIR}/lib/${link}.lib)
|
|
404 make_native_path(link)
|
|
405 set(link -L+${link})
|
|
406 set(${package}_lib_param ${${package}_lib_param} ${link})
|
|
407 endforeach(link ${link_example})
|
|
408 else (${CMAKE_SYSTEM_NAME} STREQUAL Windows AND D_IS_MARS)
|
|
409 set(${package}_lib_param -L-lqtd${package} -L-lQt${package_big})
|
|
410 foreach(link ${link_example})
|
|
411 set(${package}_lib_param ${${package}_lib_param} ${link})
|
|
412 endforeach(link ${link_example})
|
|
413 endif(${CMAKE_SYSTEM_NAME} STREQUAL Windows AND D_IS_MARS)
|
|
414 endforeach(package_big ${packages_big})
|
|
415
|
|
416 ##--------------------------------------------
|
|
417 ## Build other parts of the QtD.
|
|
418 ##--------------------------------------------
|
|
419 if(BUILD_EXAMPLES)
|
4
|
420 add_subdirectory(demos)
|
|
421 add_subdirectory(examples)
|
7
|
422 endif(BUILD_EXAMPLES) |