If I link my program with my own jpeg-6b and wxwidgets lib(use
FindwxWidgets.cmake) under win32, the conflict of jpeg lib happens.

It is because the line "SET(wxWidgets_COMMON_LIBRARIES png tiff jpeg
zlib regex expat)" in FindwxWidgets.cmake

I want to start a wxwidgets console program in a process, so the
program's file size should be  as small as possible.

Here is my patch fixed the problem.

--- FindwxWidgets.cmake.orig    2009-06-16 12:08:53.390625000 +1000
+++ FindwxWidgets.cmake 2009-06-16 12:11:14.296875000 +1000
@@ -187,7 +187,11 @@
 #=====================================================================
 IF(wxWidgets_FIND_STYLE STREQUAL "win32")
   # Useful common wx libs needed by almost all components.
-  SET(wxWidgets_COMMON_LIBRARIES png tiff jpeg zlib regex expat)
+  IF(DEFINED My_wxWidgets_COMMON_LIBRARIES)
+    SET(wxWidgets_COMMON_LIBRARIES ${My_wxWidgets_COMMON_LIBRARIES})
+  ELSE(DEFINED My_wxWidgets_COMMON_LIBRARIES)
+    SET(wxWidgets_COMMON_LIBRARIES png tiff jpeg zlib regex expat)
+  ENDIF(DEFINED My_wxWidgets_COMMON_LIBRARIES)

   # DEPRECATED: Use FIND_PACKAGE(wxWidgets COMPONENTS mono) instead.
   IF(NOT wxWidgets_FIND_COMPONENTS)

Regards,
Chen Bin

-- 
help me, help you.
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to