FindwxWidgets.cmake 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834
  1. # - Find a wxWidgets (a.k.a., wxWindows) installation.
  2. # This module finds if wxWidgets is installed and selects a default
  3. # configuration to use. wxWidgets is a modular library. To specify the
  4. # modules that you will use, you need to name them as components to
  5. # the package:
  6. #
  7. # FIND_PACKAGE(wxWidgets COMPONENTS base core ...)
  8. #
  9. # There are two search branches: a windows style and a unix style. For
  10. # windows, the following variables are searched for and set to
  11. # defaults in case of multiple choices. Change them if the defaults
  12. # are not desired (i.e., these are the only variables you should
  13. # change to select a configuration):
  14. #
  15. # wxWidgets_ROOT_DIR - Base wxWidgets directory
  16. # (e.g., C:/wxWidgets-2.6.3).
  17. # wxWidgets_LIB_DIR - Path to wxWidgets libraries
  18. # (e.g., C:/wxWidgets-2.6.3/lib/vc_lib).
  19. # wxWidgets_CONFIGURATION - Configuration to use
  20. # (e.g., msw, mswd, mswu, mswunivud, etc.)
  21. #
  22. # For unix style it uses the wx-config utility. You can select between
  23. # debug/release, unicode/ansi, universal/non-universal, and
  24. # static/shared in the QtDialog or ccmake interfaces by turning ON/OFF
  25. # the following variables:
  26. #
  27. # wxWidgets_USE_DEBUG
  28. # wxWidgets_USE_UNICODE
  29. # wxWidgets_USE_UNIVERSAL
  30. # wxWidgets_USE_STATIC
  31. #
  32. # The following are set after the configuration is done for both
  33. # windows and unix style:
  34. #
  35. # wxWidgets_FOUND - Set to TRUE if wxWidgets was found.
  36. # wxWidgets_INCLUDE_DIRS - Include directories for WIN32
  37. # i.e., where to find "wx/wx.h" and
  38. # "wx/setup.h"; possibly empty for unices.
  39. # wxWidgets_LIBRARIES - Path to the wxWidgets libraries.
  40. # wxWidgets_LIBRARY_DIRS - compile time link dirs, useful for
  41. # rpath on UNIX. Typically an empty string
  42. # in WIN32 environment.
  43. # wxWidgets_DEFINITIONS - Contains defines required to compile/link
  44. # against WX, e.g. -DWXUSINGDLL
  45. # wxWidgets_CXX_FLAGS - Include dirs and ompiler flags for
  46. # unices, empty on WIN32. Esentially
  47. # "`wx-config --cxxflags`".
  48. # wxWidgets_USE_FILE - Convenience include file.
  49. #
  50. # Sample usage:
  51. # FIND_PACKAGE(wxWidgets COMPONENTS base core gl net)
  52. # IF(wxWidgets_FOUND)
  53. # INCLUDE(${wxWidgets_USE_FILE})
  54. # # and for each of your dependant executable/library targets:
  55. # TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
  56. # ENDIF(wxWidgets_FOUND)
  57. #
  58. # If wxWidgets is required (i.e., not an optional part):
  59. # FIND_PACKAGE(wxWidgets REQUIRED base core gl net)
  60. # INCLUDE(${wxWidgets_USE_FILE})
  61. # # and for each of your dependant executable/library targets:
  62. # TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
  63. #
  64. # FIXME: check this and provide a correct sample usage...
  65. # Sample usage with monolithic wx build:
  66. #
  67. # SET(wxWidgets_USE_LIBS msw26 expat jpeg gl png regex tiff zlib)
  68. # ...
  69. # NOTES
  70. #
  71. # This module has been tested on the WIN32 platform with wxWidgets
  72. # 2.6.2, 2.6.3, and 2.5.3. However, it has been designed to
  73. # easily extend support to all possible builds, e.g., static/shared,
  74. # debug/release, unicode, universal, multilib/monolithic, etc..
  75. #
  76. # If you want to use the module and your build type is not supported
  77. # out-of-the-box, please contact me to exchange information on how
  78. # your system is setup and I'll try to add support for it.
  79. #
  80. # AUTHOR
  81. #
  82. # Miguel A. Figueroa-Villanueva (miguelf at ieee dot org).
  83. # Jan Woetzel (jw at mip.informatik.uni-kiel.de).
  84. #
  85. # Based on previous works of:
  86. # Jan Woetzel (FindwxWindows.cmake),
  87. # Jorgen Bodde and Jerry Fath (FindwxWin.cmake).
  88. # TODO/ideas
  89. #
  90. # (1) Option/Setting to use all available wx libs
  91. # In contrast to expert developer who lists the
  92. # minimal set of required libs in wxWidgets_USE_LIBS
  93. # there is the newbie user:
  94. # - who just wants to link against WX with more 'magic'
  95. # - doesn't know the internal structure of WX or how it was built,
  96. # in particular if it is monolithic or not
  97. # - want to link against all available WX libs
  98. # Basically, the intent here is to mimic what wx-config would do by
  99. # default (i.e., `wx-config --libs`).
  100. #
  101. # Possible solution:
  102. # Add a reserved keyword "std" that initializes to what wx-config
  103. # would default to. If the user has not set the wxWidgets_USE_LIBS,
  104. # default to "std" instead of "base core" as it is now. To implement
  105. # "std" will basically boil down to a FOR_EACH lib-FOUND, but maybe
  106. # checking whether a minimal set was found.
  107. # FIXME: This and all the DBG_MSG calls should be removed after the
  108. # module stabilizes.
  109. #
  110. # Helper macro to control the debugging output globally. There are
  111. # two versions for controlling how verbose your output should be.
  112. MACRO(DBG_MSG _MSG)
  113. # MESSAGE(STATUS
  114. # "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}")
  115. ENDMACRO(DBG_MSG)
  116. MACRO(DBG_MSG_V _MSG)
  117. # MESSAGE(STATUS
  118. # "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}")
  119. ENDMACRO(DBG_MSG_V)
  120. # Clear return values in case the module is loaded more than once.
  121. SET(wxWidgets_FOUND FALSE)
  122. SET(wxWidgets_INCLUDE_DIRS "")
  123. SET(wxWidgets_LIBRARIES "")
  124. SET(wxWidgets_LIBRARY_DIRS "")
  125. SET(wxWidgets_CXX_FLAGS "")
  126. # FIXME: This is a patch to support the DEPRECATED use of
  127. # wxWidgets_USE_LIBS.
  128. #
  129. # If wxWidgets_USE_LIBS is set:
  130. # - if using <components>, then override wxWidgets_USE_LIBS
  131. # - else set wxWidgets_FIND_COMPONENTS to wxWidgets_USE_LIBS
  132. IF(wxWidgets_USE_LIBS AND NOT wxWidgets_FIND_COMPONENTS)
  133. SET(wxWidgets_FIND_COMPONENTS ${wxWidgets_USE_LIBS})
  134. ENDIF(wxWidgets_USE_LIBS AND NOT wxWidgets_FIND_COMPONENTS)
  135. DBG_MSG("wxWidgets_FIND_COMPONENTS : ${wxWidgets_FIND_COMPONENTS}")
  136. # Add the convenience use file if available.
  137. #
  138. # Get dir of this file which may reside in:
  139. # - CMAKE_MAKE_ROOT/Modules on CMake installation
  140. # - CMAKE_MODULE_PATH if user prefers his own specialized version
  141. SET(wxWidgets_USE_FILE "")
  142. GET_FILENAME_COMPONENT(
  143. wxWidgets_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
  144. # Prefer an existing customized version, but the user might override
  145. # the FindwxWidgets module and not the UsewxWidgets one.
  146. IF(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake")
  147. SET(wxWidgets_USE_FILE
  148. "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake")
  149. ELSE(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake")
  150. SET(wxWidgets_USE_FILE UsewxWidgets.cmake)
  151. ENDIF(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake")
  152. #=====================================================================
  153. #=====================================================================
  154. IF(WIN32)
  155. SET(WIN32_STYLE_FIND 1)
  156. ENDIF(WIN32)
  157. IF(MINGW)
  158. SET(WIN32_STYLE_FIND 0)
  159. SET(UNIX_STYLE_FIND 1)
  160. ENDIF(MINGW)
  161. IF(UNIX)
  162. SET(UNIX_STYLE_FIND 1)
  163. ENDIF(UNIX)
  164. #=====================================================================
  165. # WIN32_STYLE_FIND
  166. #=====================================================================
  167. IF(WIN32_STYLE_FIND)
  168. # FIXME: I think this should be removed... how difficult is it to
  169. # do with out it?
  170. # FIND_PACKAGE(wxWidgets COMPONENTS msw25d)
  171. # If the user knows enough to want monolithic, then he probably
  172. # knows enough to do the above...
  173. #
  174. # BTW, what happens in this case?
  175. # FIND_PACKAGE(wxWidgets)
  176. # Check these out and then remove comment. However, I think this
  177. # will probably have to stay for backward compatibility, but in
  178. # that case document it as a variable or list as deprecated.
  179. #
  180. # global settings for std and common wx libs logic could determine
  181. # _USE_MONOLITHIC automatically but let the user decide for now.
  182. IF(wxWidgets_USE_MONOLITHIC)
  183. SET(wxWidgets_STD_LIBRARIES mono)
  184. ELSE(wxWidgets_USE_MONOLITHIC)
  185. SET(wxWidgets_STD_LIBRARIES base core) # this is default
  186. ENDIF(wxWidgets_USE_MONOLITHIC)
  187. #useful common wx libs needed by almost all components
  188. SET(wxWidgets_COMMON_LIBRARIES png tiff jpeg zlib regex expat)
  189. #-------------------------------------------------------------------
  190. # WIN32: Helper MACROS
  191. #-------------------------------------------------------------------
  192. #
  193. # Get filename components for a configuration. For example,
  194. # if _CONFIGURATION = mswunivud, then _UNV=univ, _UCD=u _DBG=d
  195. # if _CONFIGURATION = mswu, then _UNV="", _UCD=u _DBG=""
  196. #
  197. MACRO(WX_GET_NAME_COMPONENTS _CONFIGURATION _UNV _UCD _DBG)
  198. STRING(REGEX MATCH "univ" ${_UNV} "${_CONFIGURATION}")
  199. STRING(REGEX REPLACE "msw.*(u)[d]*$" "u" ${_UCD} "${_CONFIGURATION}")
  200. IF(${_UCD} STREQUAL ${_CONFIGURATION})
  201. SET(${_UCD} "")
  202. ENDIF(${_UCD} STREQUAL ${_CONFIGURATION})
  203. STRING(REGEX MATCH "d$" ${_DBG} "${_CONFIGURATION}")
  204. ENDMACRO(WX_GET_NAME_COMPONENTS)
  205. #
  206. # Find libraries associated to a configuration.
  207. #
  208. MACRO(WX_FIND_LIBS _UNV _UCD _DBG)
  209. DBG_MSG_V("m_unv = ${_UNV}")
  210. DBG_MSG_V("m_ucd = ${_UCD}")
  211. DBG_MSG_V("m_dbg = ${_DBG}")
  212. # Find wxWidgets common libraries
  213. FOREACH(LIB png tiff jpeg zlib regex expat)
  214. FIND_LIBRARY(WX_${LIB}${_DBG}
  215. NAMES
  216. wx${LIB}${_UCD}${_DBG} # for regex
  217. wx${LIB}${_DBG}
  218. PATHS ${WX_LIB_DIR}
  219. NO_DEFAULT_PATH
  220. )
  221. MARK_AS_ADVANCED(WX_${LIB}${_DBG})
  222. ENDFOREACH(LIB)
  223. # Find wxWidgets multilib base libraries
  224. FIND_LIBRARY(WX_base${_DBG}
  225. NAMES
  226. wxbase29${_UCD}${_DBG}
  227. wxbase28${_UCD}${_DBG}
  228. wxbase27${_UCD}${_DBG}
  229. wxbase26${_UCD}${_DBG}
  230. wxbase25${_UCD}${_DBG}
  231. PATHS ${WX_LIB_DIR}
  232. NO_DEFAULT_PATH
  233. )
  234. MARK_AS_ADVANCED(WX_base${_DBG})
  235. FOREACH(LIB net odbc xml)
  236. FIND_LIBRARY(WX_${LIB}${_DBG}
  237. NAMES
  238. wxbase29${_UCD}${_DBG}_${LIB}
  239. wxbase28${_UCD}${_DBG}_${LIB}
  240. wxbase27${_UCD}${_DBG}_${LIB}
  241. wxbase26${_UCD}${_DBG}_${LIB}
  242. wxbase25${_UCD}${_DBG}_${LIB}
  243. PATHS ${WX_LIB_DIR}
  244. NO_DEFAULT_PATH
  245. )
  246. MARK_AS_ADVANCED(WX_${LIB}${_DBG})
  247. ENDFOREACH(LIB)
  248. # Find wxWidgets monolithic library
  249. FIND_LIBRARY(WX_mono${_DBG}
  250. NAMES
  251. wxmsw${_UNV}29${_UCD}${_DBG}
  252. wxmsw${_UNV}28${_UCD}${_DBG}
  253. wxmsw${_UNV}27${_UCD}${_DBG}
  254. wxmsw${_UNV}26${_UCD}${_DBG}
  255. wxmsw${_UNV}25${_UCD}${_DBG}
  256. PATHS ${WX_LIB_DIR}
  257. NO_DEFAULT_PATH
  258. )
  259. MARK_AS_ADVANCED(WX_mono${_DBG})
  260. # Find wxWidgets multilib libraries
  261. FOREACH(LIB core adv aui html media xrc dbgrid gl qa)
  262. FIND_LIBRARY(WX_${LIB}${_DBG}
  263. NAMES
  264. wxmsw${_UNV}29${_UCD}${_DBG}_${LIB}
  265. wxmsw${_UNV}28${_UCD}${_DBG}_${LIB}
  266. wxmsw${_UNV}27${_UCD}${_DBG}_${LIB}
  267. wxmsw${_UNV}26${_UCD}${_DBG}_${LIB}
  268. wxmsw${_UNV}25${_UCD}${_DBG}_${LIB}
  269. PATHS ${WX_LIB_DIR}
  270. NO_DEFAULT_PATH
  271. )
  272. MARK_AS_ADVANCED(WX_${LIB}${_DBG})
  273. ENDFOREACH(LIB)
  274. ENDMACRO(WX_FIND_LIBS)
  275. #
  276. # Clear all library paths, so that FIND_LIBRARY refinds them.
  277. #
  278. # Clear a lib, reset its found flag, and mark as advanced.
  279. MACRO(WX_CLEAR_LIB _LIB)
  280. SET(${_LIB} "${_LIB}-NOTFOUND" CACHE FILEPATH "Cleared." FORCE)
  281. SET(${_LIB}_FOUND FALSE)
  282. MARK_AS_ADVANCED(${_LIB})
  283. ENDMACRO(WX_CLEAR_LIB)
  284. # Clear all debug or release library paths (arguments are "d" or "").
  285. MACRO(WX_CLEAR_ALL_LIBS _DBG)
  286. # Clear wxWidgets common libraries
  287. FOREACH(LIB png tiff jpeg zlib regex expat)
  288. WX_CLEAR_LIB(WX_${LIB}${_DBG})
  289. ENDFOREACH(LIB)
  290. # Clear wxWidgets multilib base libraries
  291. WX_CLEAR_LIB(WX_base${_DBG})
  292. FOREACH(LIB net odbc xml)
  293. WX_CLEAR_LIB(WX_${LIB}${_DBG})
  294. ENDFOREACH(LIB)
  295. # Clear wxWidgets monolithic library
  296. WX_CLEAR_LIB(WX_mono${_DBG})
  297. # Clear wxWidgets multilib libraries
  298. FOREACH(LIB core adv aui html media xrc dbgrid gl qa)
  299. WX_CLEAR_LIB(WX_${LIB}${_DBG})
  300. ENDFOREACH(LIB)
  301. ENDMACRO(WX_CLEAR_ALL_LIBS)
  302. # Clear all wxWidgets debug libraries.
  303. MACRO(WX_CLEAR_ALL_DBG_LIBS)
  304. WX_CLEAR_ALL_LIBS("d")
  305. ENDMACRO(WX_CLEAR_ALL_DBG_LIBS)
  306. # Clear all wxWidgets release libraries.
  307. MACRO(WX_CLEAR_ALL_REL_LIBS)
  308. WX_CLEAR_ALL_LIBS("")
  309. ENDMACRO(WX_CLEAR_ALL_REL_LIBS)
  310. #
  311. # Set the wxWidgets_LIBRARIES variable.
  312. # Also, Sets output variable wxWidgets_FOUND to FALSE if it fails.
  313. #
  314. MACRO(WX_SET_LIBRARIES _LIBS _DBG)
  315. DBG_MSG_V("Looking for ${${_LIBS}}")
  316. IF(WX_USE_REL_AND_DBG)
  317. FOREACH(LIB ${${_LIBS}})
  318. DBG_MSG_V("Searching for ${LIB} and ${LIB}d")
  319. DBG_MSG_V("WX_${LIB} : ${WX_${LIB}}")
  320. DBG_MSG_V("WX_${LIB}d : ${WX_${LIB}d}")
  321. IF(WX_${LIB} AND WX_${LIB}d)
  322. DBG_MSG_V("Found ${LIB} and ${LIB}d")
  323. LIST(APPEND wxWidgets_LIBRARIES
  324. debug ${WX_${LIB}d} optimized ${WX_${LIB}}
  325. )
  326. ELSE(WX_${LIB} AND WX_${LIB}d)
  327. DBG_MSG_V("- not found due to missing WX_${LIB}=${WX_${LIB}} or WX_${LIB}d=${WX_${LIB}d}")
  328. SET(wxWidgets_FOUND FALSE)
  329. ENDIF(WX_${LIB} AND WX_${LIB}d)
  330. ENDFOREACH(LIB)
  331. ELSE(WX_USE_REL_AND_DBG)
  332. FOREACH(LIB ${${_LIBS}})
  333. DBG_MSG_V("Searching for ${LIB}${_DBG}")
  334. DBG_MSG_V("WX_${LIB}${_DBG} : ${WX_${LIB}${_DBG}}")
  335. IF(WX_${LIB}${_DBG})
  336. DBG_MSG_V("Found ${LIB}${_DBG}")
  337. LIST(APPEND wxWidgets_LIBRARIES ${WX_${LIB}${_DBG}})
  338. ELSE(WX_${LIB}${_DBG})
  339. DBG_MSG_V(
  340. "- not found due to missing WX_${LIB}${_DBG}=${WX_${LIB}${_DBG}}")
  341. SET(wxWidgets_FOUND FALSE)
  342. ENDIF(WX_${LIB}${_DBG})
  343. ENDFOREACH(LIB)
  344. ENDIF(WX_USE_REL_AND_DBG)
  345. DBG_MSG_V("OpenGL")
  346. LIST(FIND ${_LIBS} gl WX_USE_GL)
  347. IF(NOT WX_USE_GL EQUAL -1)
  348. DBG_MSG_V("- is required.")
  349. LIST(APPEND wxWidgets_LIBRARIES opengl32 glu32)
  350. ENDIF(NOT WX_USE_GL EQUAL -1)
  351. LIST(APPEND wxWidgets_LIBRARIES winmm comctl32 rpcrt4 wsock32)
  352. ENDMACRO(WX_SET_LIBRARIES)
  353. #-------------------------------------------------------------------
  354. # WIN32: Start actual work.
  355. #-------------------------------------------------------------------
  356. # Look for an installation tree.
  357. FIND_PATH(wxWidgets_ROOT_DIR
  358. NAMES include/wx/wx.h
  359. PATHS
  360. $ENV{wxWidgets_ROOT_DIR}
  361. $ENV{WXWIN}
  362. "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWidgets_is1;Inno Setup: App Path]" # WX 2.6.x
  363. C:/
  364. D:/
  365. $ENV{ProgramFiles}
  366. PATH_SUFFIXES
  367. wxWidgets-2.8.7
  368. wxWidgets-2.8.6
  369. wxWidgets-2.8.5
  370. wxWidgets-2.8.4
  371. wxWidgets-2.8.3
  372. wxWidgets-2.8.2
  373. wxWidgets-2.8.1
  374. wxWidgets-2.8.0
  375. wxWidgets-2.7.4
  376. wxWidgets-2.7.3
  377. wxWidgets-2.7.2
  378. wxWidgest-2.7.1
  379. wxWidgets-2.7.0
  380. wxWidgets-2.7.0-1
  381. wxWidgets-2.6.3
  382. wxWidgets-2.6.2
  383. wxWidgets-2.6.1
  384. wxWidgets-2.5.4
  385. wxWidgets-2.5.3
  386. wxWidgets-2.5.2
  387. wxWidgets-2.5.1
  388. wxWidgets
  389. DOC "wxWidgets base/installation directory?"
  390. )
  391. # If wxWidgets_ROOT_DIR changed, clear lib dir.
  392. IF(NOT WX_ROOT_DIR STREQUAL wxWidgets_ROOT_DIR)
  393. SET(WX_ROOT_DIR ${wxWidgets_ROOT_DIR} CACHE INTERNAL "wxWidgets_ROOT_DIR")
  394. SET(wxWidgets_LIB_DIR "wxWidgets_LIB_DIR-NOTFOUND" CACHE PATH "Cleared." FORCE)
  395. ENDIF(NOT WX_ROOT_DIR STREQUAL wxWidgets_ROOT_DIR)
  396. IF(WX_ROOT_DIR)
  397. # Select one default tree inside the already determined wx tree.
  398. # Prefer static/shared order usually consistent with build
  399. # settings.
  400. IF(BUILD_SHARED_LIBS)
  401. FIND_PATH(wxWidgets_LIB_DIR
  402. NAMES wxpng.lib wxpngd.lib
  403. PATHS
  404. ${WX_ROOT_DIR}/lib/vc_dll # prefer shared
  405. ${WX_ROOT_DIR}/lib/vc_lib
  406. DOC "Path to wxWidgets libraries?"
  407. NO_DEFAULT_PATH
  408. )
  409. ELSE(BUILD_SHARED_LIBS)
  410. FIND_PATH(wxWidgets_LIB_DIR
  411. NAMES wxpng.lib wxpngd.lib
  412. PATHS
  413. ${WX_ROOT_DIR}/lib/vc_lib # prefer static
  414. ${WX_ROOT_DIR}/lib/vc_dll
  415. DOC "Path to wxWidgets libraries?"
  416. NO_DEFAULT_PATH
  417. )
  418. ENDIF(BUILD_SHARED_LIBS)
  419. # If wxWidgets_LIB_DIR changed, clear all libraries.
  420. IF(NOT WX_LIB_DIR STREQUAL wxWidgets_LIB_DIR)
  421. SET(WX_LIB_DIR ${wxWidgets_LIB_DIR} CACHE INTERNAL "wxWidgets_LIB_DIR")
  422. WX_CLEAR_ALL_DBG_LIBS()
  423. WX_CLEAR_ALL_REL_LIBS()
  424. ENDIF(NOT WX_LIB_DIR STREQUAL wxWidgets_LIB_DIR)
  425. IF(WX_LIB_DIR)
  426. SET(wxWidgets_FOUND TRUE)
  427. # If building shared libs, define WXUSINGDLL to use dllimport.
  428. IF(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*")
  429. SET(wxWidgets_DEFINITIONS "-DWXUSINGDLL")
  430. DBG_MSG_V("detected SHARED/DLL tree WX_LIB_DIR=${WX_LIB_DIR}")
  431. ENDIF(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*")
  432. # Search for available configuration types.
  433. FOREACH(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw)
  434. SET(WX_${CFG}_FOUND FALSE)
  435. IF(EXISTS ${WX_LIB_DIR}/${CFG})
  436. LIST(APPEND WX_CONFIGURATION_LIST ${CFG})
  437. SET(WX_${CFG}_FOUND TRUE)
  438. SET(WX_CONFIGURATION ${CFG})
  439. ENDIF(EXISTS ${WX_LIB_DIR}/${CFG})
  440. ENDFOREACH(CFG)
  441. DBG_MSG_V("WX_CONFIGURATION_LIST=${WX_CONFIGURATION_LIST}")
  442. IF(WX_CONFIGURATION)
  443. # If the selected configuration wasn't found force the default
  444. # one. Otherwise, use it but still force a refresh for
  445. # updating the doc string with the current list of available
  446. # configurations.
  447. IF(NOT WX_${wxWidgets_CONFIGURATION}_FOUND)
  448. SET(wxWidgets_CONFIGURATION ${WX_CONFIGURATION} CACHE STRING
  449. "Set wxWidgets configuration (${WX_CONFIGURATION_LIST})" FORCE)
  450. ELSE(NOT WX_${wxWidgets_CONFIGURATION}_FOUND)
  451. SET(wxWidgets_CONFIGURATION ${wxWidgets_CONFIGURATION} CACHE STRING
  452. "Set wxWidgets configuration (${WX_CONFIGURATION_LIST})" FORCE)
  453. ENDIF(NOT WX_${wxWidgets_CONFIGURATION}_FOUND)
  454. # If release config selected, and both release/debug exist.
  455. IF(WX_${wxWidgets_CONFIGURATION}d_FOUND)
  456. OPTION(wxWidgets_USE_REL_AND_DBG
  457. "Use release and debug configurations?" TRUE)
  458. SET(WX_USE_REL_AND_DBG ${wxWidgets_USE_REL_AND_DBG})
  459. ELSE(WX_${wxWidgets_CONFIGURATION}d_FOUND)
  460. # If the option exists (already in cache), force it false.
  461. IF(wxWidgets_USE_REL_AND_DBG)
  462. SET(wxWidgets_USE_REL_AND_DBG FALSE CACHE BOOL
  463. "No ${wxWidgets_CONFIGURATION}d found." FORCE)
  464. ENDIF(wxWidgets_USE_REL_AND_DBG)
  465. SET(WX_USE_REL_AND_DBG FALSE)
  466. ENDIF(WX_${wxWidgets_CONFIGURATION}d_FOUND)
  467. # Get configuration parameters from the name.
  468. WX_GET_NAME_COMPONENTS(${wxWidgets_CONFIGURATION} UNV UCD DBG)
  469. # Set wxWidgets main include directory.
  470. IF(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h)
  471. SET(wxWidgets_INCLUDE_DIRS ${WX_ROOT_DIR}/include)
  472. ELSE(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h)
  473. DBG_MSG("wxWidgets_FOUND FALSE because WX_ROOT_DIR=${WX_ROOT_DIR} has no ${WX_ROOT_DIR}/include/wx/wx.h")
  474. SET(wxWidgets_FOUND FALSE)
  475. ENDIF(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h)
  476. # Set wxWidgets lib setup include directory.
  477. IF(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h)
  478. LIST(APPEND wxWidgets_INCLUDE_DIRS
  479. ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION})
  480. ELSE(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h)
  481. DBG_MSG("WXWIDGET_FOUND FALSE because ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h does not exists.")
  482. SET(wxWidgets_FOUND FALSE)
  483. ENDIF(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h)
  484. # Find wxWidgets libraries.
  485. WX_FIND_LIBS("${UNV}" "${UCD}" "${DBG}")
  486. IF(WX_USE_REL_AND_DBG)
  487. WX_FIND_LIBS("${UNV}" "${UCD}" "d")
  488. ENDIF(WX_USE_REL_AND_DBG)
  489. # If no library was requested, set default minimum set (i.e.,
  490. # link to only core,base or mono).
  491. IF(NOT wxWidgets_FIND_COMPONENTS)
  492. SET(wxWidgets_FIND_COMPONENTS ${wxWidgets_STD_LIBRARIES})
  493. ENDIF(NOT wxWidgets_FIND_COMPONENTS)
  494. # Always add the common required libs.
  495. LIST(APPEND wxWidgets_FIND_COMPONENTS ${wxWidgets_COMMON_LIBRARIES})
  496. # Settings for requested libs (i.e., include dir, libraries, etc.).
  497. WX_SET_LIBRARIES(wxWidgets_FIND_COMPONENTS "${DBG}")
  498. ENDIF(WX_CONFIGURATION)
  499. ENDIF(WX_LIB_DIR)
  500. ENDIF(WX_ROOT_DIR)
  501. #=====================================================================
  502. # UNIX_STYLE_FIND
  503. #=====================================================================
  504. ELSE(WIN32_STYLE_FIND)
  505. IF(UNIX_STYLE_FIND)
  506. #-----------------------------------------------------------------
  507. # UNIX: Helper MACROS
  508. #-----------------------------------------------------------------
  509. #
  510. # Set the default values based on "wx-config --selected-config".
  511. #
  512. MACRO(WX_CONFIG_SELECT_GET_DEFAULT)
  513. EXECUTE_PROCESS(
  514. COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" --selected-config
  515. OUTPUT_VARIABLE _wx_selected_config
  516. RESULT_VARIABLE _wx_result
  517. ERROR_QUIET
  518. )
  519. IF(_wx_result EQUAL 0)
  520. FOREACH(_opt_name debug static unicode universal)
  521. STRING(TOUPPER ${_opt_name} _upper_opt_name)
  522. IF(_wx_selected_config MATCHES ".*${_opt_name}.*")
  523. SET(wxWidgets_DEFAULT_${_upper_opt_name} ON)
  524. ELSE(_wx_selected_config MATCHES ".*${_opt_name}.*")
  525. SET(wxWidgets_DEFAULT_${_upper_opt_name} OFF)
  526. ENDIF(_wx_selected_config MATCHES ".*${_opt_name}.*")
  527. ENDFOREACH(_opt_name)
  528. ELSE(_wx_result EQUAL 0)
  529. FOREACH(_upper_opt_name DEBUG STATIC UNICODE UNIVERSAL)
  530. SET(wxWidgets_DEFAULT_${_upper_opt_name} OFF)
  531. ENDFOREACH(_opt_name)
  532. ENDIF(_wx_result EQUAL 0)
  533. ENDMACRO(WX_CONFIG_SELECT_GET_DEFAULT)
  534. #
  535. # Query a boolean configuration option to determine if the system
  536. # has both builds available. If so, provide the selection option
  537. # to the user.
  538. #
  539. MACRO(WX_CONFIG_SELECT_QUERY_BOOL _OPT_NAME _OPT_HELP)
  540. EXECUTE_PROCESS(
  541. COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" --${_OPT_NAME}=yes
  542. RESULT_VARIABLE _wx_result_yes
  543. OUTPUT_QUIET
  544. ERROR_QUIET
  545. )
  546. EXECUTE_PROCESS(
  547. COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" --${_OPT_NAME}=no
  548. RESULT_VARIABLE _wx_result_no
  549. OUTPUT_QUIET
  550. ERROR_QUIET
  551. )
  552. STRING(TOUPPER ${_OPT_NAME} _UPPER_OPT_NAME)
  553. IF(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0)
  554. OPTION(wxWidgets_USE_${_UPPER_OPT_NAME}
  555. ${_OPT_HELP} ${wxWidgets_DEFAULT_${_UPPER_OPT_NAME}})
  556. ELSE(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0)
  557. # If option exists (already in cache), force to available one.
  558. IF(DEFINED wxWidgets_USE_${_UPPER_OPT_NAME})
  559. IF(_wx_result_yes EQUAL 0)
  560. SET(wxWidgets_USE_${_UPPER_OPT_NAME} ON CACHE BOOL ${_OPT_HELP} FORCE)
  561. ELSE(_wx_result_yes EQUAL 0)
  562. SET(wxWidgets_USE_${_UPPER_OPT_NAME} OFF CACHE BOOL ${_OPT_HELP} FORCE)
  563. ENDIF(_wx_result_yes EQUAL 0)
  564. ENDIF(DEFINED wxWidgets_USE_${_UPPER_OPT_NAME})
  565. ENDIF(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0)
  566. ENDMACRO(WX_CONFIG_SELECT_QUERY_BOOL)
  567. #
  568. # Set wxWidgets_SELECT_OPTIONS to wx-config options for selecting
  569. # among multiple builds.
  570. #
  571. MACRO(WX_CONFIG_SELECT_SET_OPTIONS)
  572. SET(wxWidgets_SELECT_OPTIONS "")
  573. FOREACH(_opt_name debug static unicode universal)
  574. STRING(TOUPPER ${_opt_name} _upper_opt_name)
  575. IF(DEFINED wxWidgets_USE_${_upper_opt_name})
  576. IF(wxWidgets_USE_${_upper_opt_name})
  577. LIST(APPEND wxWidgets_SELECT_OPTIONS --${_opt_name}=yes)
  578. ELSE(wxWidgets_USE_${_upper_opt_name})
  579. LIST(APPEND wxWidgets_SELECT_OPTIONS --${_opt_name}=no)
  580. ENDIF(wxWidgets_USE_${_upper_opt_name})
  581. ENDIF(DEFINED wxWidgets_USE_${_upper_opt_name})
  582. ENDFOREACH(_opt_name)
  583. ENDMACRO(WX_CONFIG_SELECT_SET_OPTIONS)
  584. #-----------------------------------------------------------------
  585. # UNIX: Start actual work.
  586. #-----------------------------------------------------------------
  587. FIND_PROGRAM(wxWidgets_CONFIG_EXECUTABLE wx-config)
  588. IF(wxWidgets_CONFIG_EXECUTABLE)
  589. SET(wxWidgets_FOUND TRUE)
  590. # get defaults based on "wx-config --selected-config"
  591. WX_CONFIG_SELECT_GET_DEFAULT()
  592. # for each option: if both builds are available, provide option
  593. WX_CONFIG_SELECT_QUERY_BOOL(debug "Use debug build?")
  594. WX_CONFIG_SELECT_QUERY_BOOL(unicode "Use unicode build?")
  595. WX_CONFIG_SELECT_QUERY_BOOL(universal "Use universal build?")
  596. WX_CONFIG_SELECT_QUERY_BOOL(static "Link libraries statically?")
  597. # process selection to set wxWidgets_SELECT_OPTIONS
  598. WX_CONFIG_SELECT_SET_OPTIONS()
  599. DBG_MSG("wxWidgets_SELECT_OPTIONS=${wxWidgets_SELECT_OPTIONS}")
  600. # run the wx-config program to get cxxflags
  601. EXECUTE_PROCESS(
  602. COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
  603. ${wxWidgets_SELECT_OPTIONS} --cxxflags
  604. OUTPUT_VARIABLE wxWidgets_CXX_FLAGS
  605. RESULT_VARIABLE RET
  606. ERROR_QUIET
  607. )
  608. IF(RET EQUAL 0)
  609. STRING(STRIP "${wxWidgets_CXX_FLAGS}" wxWidgets_CXX_FLAGS)
  610. SEPARATE_ARGUMENTS(wxWidgets_CXX_FLAGS)
  611. DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}")
  612. # parse definitions from cxxflags; drop -D* from CXXFLAGS
  613. STRING(REGEX MATCHALL "-D[^;]+"
  614. wxWidgets_DEFINITIONS "${wxWidgets_CXX_FLAGS}")
  615. STRING(REGEX REPLACE "-D[^;]+;" ""
  616. wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")
  617. # parse include dirs from cxxflags; drop -I prefix
  618. STRING(REGEX MATCHALL "-I[^;]+"
  619. wxWidgets_INCLUDE_DIRS "${wxWidgets_CXX_FLAGS}")
  620. STRING(REGEX REPLACE "-I[^;]+;" ""
  621. wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")
  622. STRING(REPLACE "-I" ""
  623. wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}")
  624. # convert space to semicolons for list
  625. # SEPARATE_ARGUMENTS(wxWidgets_INCLUDE_DIRS)
  626. DBG_MSG_V("wxWidgets_DEFINITIONS=${wxWidgets_DEFINITIONS}")
  627. DBG_MSG_V("wxWidgets_INCLUDE_DIRS=${wxWidgets_INCLUDE_DIRS}")
  628. DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}")
  629. ELSE(RET EQUAL 0)
  630. SET(wxWidgets_FOUND FALSE)
  631. DBG_MSG_V(
  632. "${wxWidgets_CONFIG_EXECUTABLE} --cxxflags FAILED with RET=${RET}")
  633. ENDIF(RET EQUAL 0)
  634. # run the wx-config program to get the libs
  635. # - NOTE: wx-config doesn't verify that the libs requested exist
  636. # it just produces the names. Maybe a TRY_COMPILE would
  637. # be useful here...
  638. STRING(REPLACE ";" ","
  639. wxWidgets_FIND_COMPONENTS "${wxWidgets_FIND_COMPONENTS}")
  640. EXECUTE_PROCESS(
  641. COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
  642. ${wxWidgets_SELECT_OPTIONS} --libs ${wxWidgets_FIND_COMPONENTS}
  643. OUTPUT_VARIABLE wxWidgets_LIBRARIES
  644. RESULT_VARIABLE RET
  645. ERROR_QUIET
  646. )
  647. IF(RET EQUAL 0)
  648. STRING(STRIP "${wxWidgets_LIBRARIES}" wxWidgets_LIBRARIES)
  649. SEPARATE_ARGUMENTS(wxWidgets_LIBRARIES)
  650. STRING(REPLACE "-framework;" "-framework "
  651. wxWidgets_LIBRARIES "${wxWidgets_LIBRARIES}")
  652. STRING(REPLACE "-arch;" "-arch "
  653. wxWidgets_LIBRARIES "${wxWidgets_LIBRARIES}")
  654. STRING(REPLACE "-isysroot;" "-isysroot "
  655. wxWidgets_LIBRARIES "${wxWidgets_LIBRARIES}")
  656. # extract linkdirs (-L) for rpath (i.e., LINK_DIRECTORIES)
  657. STRING(REGEX MATCHALL "-L[^;]+"
  658. wxWidgets_LIBRARY_DIRS "${wxWidgets_LIBRARIES}")
  659. STRING(REPLACE "-L" ""
  660. wxWidgets_LIBRARY_DIRS "${wxWidgets_LIBRARY_DIRS}")
  661. # convert space to semicolons for list
  662. # SEPARATE_ARGUMENTS(wxWidgets_LIBRARY_DIRS)
  663. DBG_MSG_V("wxWidgets_LIBRARIES=${wxWidgets_LIBRARIES}")
  664. DBG_MSG_V("wxWidgets_LIBRARY_DIRS=${wxWidgets_LIBRARY_DIRS}")
  665. ELSE(RET EQUAL 0)
  666. SET(wxWidgets_FOUND FALSE)
  667. DBG_MSG("${wxWidgets_CONFIG_EXECUTABLE} --libs ${wxWidgets_FIND_COMPONENTS} FAILED with RET=${RET}")
  668. ENDIF(RET EQUAL 0)
  669. ENDIF(wxWidgets_CONFIG_EXECUTABLE)
  670. #=====================================================================
  671. # Neither UNIX_STYLE_FIND, nor WIN32_STYLE_FIND
  672. #=====================================================================
  673. ELSE(UNIX_STYLE_FIND)
  674. IF(NOT wxWidgets_FIND_QUIETLY)
  675. MESSAGE(STATUS
  676. "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): \n"
  677. " Platform unknown/unsupported. It's neither WIN32 nor UNIX "
  678. "style find."
  679. )
  680. ENDIF(NOT wxWidgets_FIND_QUIETLY)
  681. ENDIF(UNIX_STYLE_FIND)
  682. ENDIF(WIN32_STYLE_FIND)
  683. # Debug output:
  684. DBG_MSG("wxWidgets_FOUND : ${wxWidgets_FOUND}")
  685. DBG_MSG("wxWidgets_INCLUDE_DIRS : ${wxWidgets_INCLUDE_DIRS}")
  686. DBG_MSG("wxWidgets_LIBRARY_DIRS : ${wxWidgets_LIBRARY_DIRS}")
  687. DBG_MSG("wxWidgets_LIBRARIES : ${wxWidgets_LIBRARIES}")
  688. DBG_MSG("wxWidgets_CXX_FLAGS : ${wxWidgets_CXX_FLAGS}")
  689. DBG_MSG("wxWidgets_USE_FILE : ${wxWidgets_USE_FILE}")
  690. #=====================================================================
  691. #=====================================================================
  692. INCLUDE(FindPackageHandleStandardArgs)
  693. FIND_PACKAGE_HANDLE_STANDARD_ARGS(wxWidgets DEFAULT_MSG wxWidgets_FOUND)
  694. #=====================================================================
  695. # Macros for use in wxWidgets apps.
  696. # - This module will not fail to find wxWidgets based on the code
  697. # below. Hence, it's required to check for validity of:
  698. #
  699. # wxWidgets_wxrc_EXECUTABLE
  700. #=====================================================================
  701. # Resource file compiler.
  702. FIND_PROGRAM(wxWidgets_wxrc_EXECUTABLE wxrc
  703. ${wxWidgets_ROOT_DIR}/utils/wxrc/vc_msw
  704. )
  705. #
  706. # WXWIDGETS_ADD_RESOURCES(<sources> <xrc_files>)
  707. #
  708. # Adds a custom command for resource file compilation of the
  709. # <xrc_files> and appends the output files to <sources>.
  710. #
  711. # Example usage: WXWIDGETS_ADD_RESOURCES(sources xrc/main_frame.xrc)
  712. #
  713. MACRO(WXWIDGETS_ADD_RESOURCES outfiles)
  714. SET(_RC_INFILES)
  715. SET(_RC_DEPENDS)
  716. FOREACH(it ${ARGN})
  717. GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
  718. GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
  719. LIST(APPEND _RC_INFILES ${infile})
  720. # parse file for dependencies; all files are absolute paths or
  721. # relative to the location of the rc file
  722. FILE(READ "${infile}" _RC_FILE_CONTENTS)
  723. # get bitmap/bitmap2 files
  724. STRING(REGEX MATCHALL "<bitmap[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
  725. FOREACH(_RC_FILE ${_RC_FILES})
  726. STRING(REGEX REPLACE "^<bitmap[^>]*>" "" _RC_FILE "${_RC_FILE}")
  727. STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}")
  728. IF(NOT _ABS_PATH_INDICATOR)
  729. SET(_RC_FILE "${rc_path}/${_RC_FILE}")
  730. ENDIF(NOT _ABS_PATH_INDICATOR)
  731. LIST(APPEND _RC_DEPENDS "${_RC_FILE}")
  732. ENDFOREACH(_RC_FILE)
  733. # get url files
  734. STRING(REGEX MATCHALL "<url[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
  735. FOREACH(_RC_FILE ${_RC_FILES})
  736. STRING(REGEX REPLACE "^<url[^>]*>" "" _RC_FILE "${_RC_FILE}")
  737. STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}")
  738. IF(NOT _ABS_PATH_INDICATOR)
  739. SET(_RC_FILE "${rc_path}/${_RC_FILE}")
  740. ENDIF(NOT _ABS_PATH_INDICATOR)
  741. LIST(APPEND _RC_DEPENDS "${_RC_FILE}")
  742. ENDFOREACH(_RC_FILE)
  743. # get wxIcon files
  744. STRING(REGEX MATCHALL "<object[^>]*class=\"wxIcon\"[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
  745. FOREACH(_RC_FILE ${_RC_FILES})
  746. STRING(REGEX REPLACE "^<object[^>]*>" "" _RC_FILE "${_RC_FILE}")
  747. STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}")
  748. IF(NOT _ABS_PATH_INDICATOR)
  749. SET(_RC_FILE "${rc_path}/${_RC_FILE}")
  750. ENDIF(NOT _ABS_PATH_INDICATOR)
  751. LIST(APPEND _RC_DEPENDS "${_RC_FILE}")
  752. ENDFOREACH(_RC_FILE)
  753. ENDFOREACH (it)
  754. SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/wxrc_resources.cxx)
  755. ADD_CUSTOM_COMMAND(
  756. OUTPUT ${outfile}
  757. COMMAND ${wxWidgets_wxrc_EXECUTABLE}
  758. --cpp-code --output=${outfile} ${_RC_INFILES}
  759. DEPENDS ${_RC_INFILES} ${_RC_DEPENDS}
  760. )
  761. LIST(APPEND ${outfiles} ${outfile})
  762. ENDMACRO(WXWIDGETS_ADD_RESOURCES)