View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0009419 | CMake | CMake | public | 2009-08-14 08:57 | 2010-03-13 23:33 | ||||
Reporter | chen bin | ||||||||
Assigned To | Miguel Figueroa | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake-2-6 | ||||||||
Target Version | Fixed in Version | CMake-2-8 | |||||||
Summary | 0009419: use FindwxWidgets and link to jpeg lib at the same time, get the jpeg version conflict in runtime | ||||||||
Description | 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) | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | cmake-bug-9419.patch [^] (1,781 bytes) 2010-03-07 05:38 [Show Content] | ||||||||
Relationships | |
Relationships |
Notes | |
(0019747) Miguel Figueroa (developer) 2010-03-07 05:41 |
Could you verify if the attached patch works for you? You will need to add the following line before your find_package(wxWidgets...) call: set(wxWidgets_COMMON_LIBRARIES TRUE) Also, you will need to add the ones you don't want to exclude to the components list. For example, if you want to exclude all except png: find_package(wxWidgets REQUIRED png...) --Miguel |
(0019872) Miguel Figueroa (developer) 2010-03-13 23:33 |
Committed in: 8f9f6b3ac1850e5b630871fd080360ad6874fb39 BUG 0009419: Added wxWidgets_EXCLUDE_COMMON_LIBRARIES option. This allows the user not to link to the common libraries, which are regularly required. The user must specify all libraries that he does want to link in the find_package line (png tiff jpeg zlib regex expat). |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2009-08-14 08:57 | chen bin | New Issue | |
2009-09-14 15:02 | Bill Hoffman | Status | new => assigned |
2009-09-14 15:02 | Bill Hoffman | Assigned To | => Miguel Figueroa |
2010-03-07 05:38 | Miguel Figueroa | File Added: cmake-bug-9419.patch | |
2010-03-07 05:41 | Miguel Figueroa | Note Added: 0019747 | |
2010-03-13 23:33 | Miguel Figueroa | Note Added: 0019872 | |
2010-03-13 23:33 | Miguel Figueroa | Status | assigned => closed |
2010-03-13 23:33 | Miguel Figueroa | Resolution | open => fixed |
2010-03-13 23:33 | Miguel Figueroa | Fixed in Version | => CMake-2-8 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |