summaryrefslogtreecommitdiffstats
path: root/Source/WXDialog
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-07-21 19:43:19 (GMT)
committerBrad King <brad.king@kitware.com>2006-07-21 19:43:19 (GMT)
commit3c9744f406d85a293fc504368d32ba34b5ed3332 (patch)
treeae48986833aa8d1aabb369c88e832e769d9ef5af /Source/WXDialog
parentb377c8ac725aea5a7b892b830b29fb80355cb097 (diff)
downloadCMake-3c9744f406d85a293fc504368d32ba34b5ed3332.zip
CMake-3c9744f406d85a293fc504368d32ba34b5ed3332.tar.gz
CMake-3c9744f406d85a293fc504368d32ba34b5ed3332.tar.bz2
ENH: Applying patch from bug#3443 to implement FindwxWidgets.cmake properly. It also updates the UseWX test and WXDialog sources to use the new find script.
Diffstat (limited to 'Source/WXDialog')
-rw-r--r--Source/WXDialog/CMakeLists.txt149
-rw-r--r--Source/WXDialog/bin/FindUPX.cmake11
-rw-r--r--Source/WXDialog/bin/FindwxW.cmake4
-rw-r--r--Source/WXDialog/bin/FindwxWin.cmake5
-rw-r--r--Source/WXDialog/bin/UsewxW.cmake4
5 files changed, 87 insertions, 86 deletions
diff --git a/Source/WXDialog/CMakeLists.txt b/Source/WXDialog/CMakeLists.txt
index 29b4fae..fc42494 100644
--- a/Source/WXDialog/CMakeLists.txt
+++ b/Source/WXDialog/CMakeLists.txt
@@ -9,88 +9,79 @@
## License: wxWidgets License
##---------------------------------------------------------------------------
+# wxWindows -> wxWidgets Jan Woetzel 07/2006
+# tested with wx 2.6.3 with "multilib" build on Windows XP
-#wxWidgets build related stuff
-SET(WXW_USE_DEBUG OFF)
-SET(WXW_USE_UNICODE OFF)
-SET(WXW_USE_SHARED OFF)
-SET(WXW_USE_UNIV OFF)
-SET(WXW_USE_MONO OFF)
-SET(WXW_FILE_VERSION "26")
-SET(WXW_VERSION "2.6")
-
-#CMake Options
+# CMake Options
SET(CMAKE_VERBOSE_MAKEFILE TRUE)
-IF(WIN32)
- INCLUDE (${CMAKE_SOURCE_DIR}/Source/WXDialog/bin/FindwxW.cmake)
-ELSE(WIN32)
- INCLUDE (${CMAKE_SOURCE_DIR}/Source/WXDialog/bin/FindwxWin.cmake)
-
- # sync flags
- SET(WXWIDGETS_FOUND ${WXWINDOWS_FOUND})
- SET(WXWIDGETS_INCLUDE_DIR ${WXWINDOWS_INCLUDE_DIR})
- SET(WXWIDGETS_LINK_DIRECTORIES ${WXWINDOWS_LINK_DIRECTORIES})
- SET(WXWIDGETS_LIBRARIES ${WXWINDOWS_LIBRARIES})
-ENDIF(WIN32)
+# suppress wx header warnings?
+#SET(HAVE_ISYSTEM 1)
+
+# in addition to wx std libs we need
+SET( wxWidgets_USE_LIBS
+ std
+ html adv xml xrc )
+FIND_PACKAGE(wxWidgets REQUIRED)
+#INCLUDE(${CMAKE_ROOT}/Modules/FindwxWidgets.cmake)
-# Old find script
+# Start using wx stuff when it is fully found and set
+IF(wxWidgets_FOUND)
+ INCLUDE( ${wxWidgets_USE_FILE} )
-## Start using wx stuff when it is fully found and set
-IF(WXWIDGETS_FOUND)
+ SET (CMAKE_SRCS
+ CMakeSetupFrame.cpp
+ CMakeSetup.cpp
+ CMakeSetupFrame.h
+ CMakeSetup.h
+ PropertyList.cpp
+ PropertyList.h
+ app_resources.cpp
+ app_resources.h
+ progressdlg.cpp
+ progressdlg.h
+ aboutdlg.cpp
+ aboutdlg.h
+ optionsdlg.cpp
+ optionsdlg.h
+ config.h
+ CommandLineInfo.cpp
+ CommandLineInfo.h )
+
+ # include .rc when windows
+ IF(WIN32)
+ SET ( CMAKE_SRCS ${CMAKE_SRCS} CMakeSetup.rc )
+ ENDIF(WIN32)
+
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/Source/WXDialog
+ ${wxWidgets_INCLUDE_DIR} )
+ LINK_DIRECTORIES( ${wxWidgets_LINK_DIRECTORIES}
+ ${CMake_BINARY_DIR}/Source
+ ${CMake_BINARY_DIR}/Source/kwsys )
+
+ IF(APPLE)
+ ADD_EXECUTABLE(WXDialog MACOSX_BUNDLE ${CMAKE_SRCS})
+ ELSE(APPLE)
+ ADD_EXECUTABLE(WXDialog WIN32 ${CMAKE_SRCS})
+ ENDIF(APPLE)
+ INSTALL_TARGETS(/bin WXDialog)
+
+ # not required on MSVS beause bound to _DEBUG,
+ # but other compiler may need it.
+ # However, the define prevents multiple build configurations
+ # in one build tree,
+ # e.g. MSVS supports Debug;Release
+ # TODO: shall we add the define or not -
+ # favor multi config or all compilers? (JW)
+ SET(CMAKE_CXX_FLAGS_DEBUG
+ "${CMAKE_CXX_FLAGS_DEBUG} -D__WXDEBUG__ -DWXDEBUG=1")
+
+ IF(LINUX)
+ ADD_DEFINITIONS( -DLINUX=1 )
+ ENDIF(LINUX)
+
+ # if the checkbox view functionality is not desired,
+ # exclude this part from the smple
+ TARGET_LINK_LIBRARIES(WXDialog ${wxWidgets_LIBRARIES} cmsys CMakeLib)
- SET (CMAKE_SRCS
- CMakeSetupFrame.cpp
- CMakeSetup.cpp
- CMakeSetupFrame.h
- CMakeSetup.h
- PropertyList.cpp
- PropertyList.h
- app_resources.cpp
- app_resources.h
- progressdlg.cpp
- progressdlg.h
- aboutdlg.cpp
- aboutdlg.h
- optionsdlg.cpp
- optionsdlg.h
- config.h
- CommandLineInfo.cpp
- CommandLineInfo.h )
-
- # include .rc when windows
-
- IF(WIN32)
- SET ( CMAKE_SRCS
- ${CMAKE_SRCS}
- CMakeSetup.rc )
- ENDIF(WIN32)
-
- INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/Source/WXDialog
- ${WXWIDGETS_INCLUDE_DIR})
- LINK_DIRECTORIES( ${WXWIDGETS_LINK_DIRECTORIES} ${CMake_BINARY_DIR}/Source ${CMake_BINARY_DIR}/Source/kwsys )
- IF(APPLE)
- ADD_EXECUTABLE(WXDialog MACOSX_BUNDLE ${CMAKE_SRCS})
- ELSE(APPLE)
- ADD_EXECUTABLE(WXDialog WIN32 ${CMAKE_SRCS})
- ENDIF(APPLE)
- INSTALL_TARGETS(/bin WXDialog)
- SET(CMAKE_CXX_FLAGS "${CMAKE_WX_CXX_FLAGS}")
- SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D__WXDEBUG__ -DWXDEBUG=1")
-
- IF(LINUX)
- ADD_DEFINITIONS( -DLINUX=1 )
- ENDIF(LINUX)
-
- # if the checkbox view functionality is not desired,
- # exclude this part from the smple
- SET(WXWIDGETS_LIBRARIES ${WXWIDGETS_LIBRARIES})
- TARGET_LINK_LIBRARIES(WXDialog ${WXWIDGETS_LIBRARIES} cmsys CMakeLib)
-
- # if UPX is found, make a target
-
- #INCLUDE (${CMAKE_SOURCE_DIR}/Source/WXDialog/bin/FindUPX.cmake)
- #IF(UPX_FOUND)
- #END(UPX_FOUND)
-
-ENDIF(WXWIDGETS_FOUND)
+ENDIF(wxWidgets_FOUND)
diff --git a/Source/WXDialog/bin/FindUPX.cmake b/Source/WXDialog/bin/FindUPX.cmake
index 7623841..fc9113d 100644
--- a/Source/WXDialog/bin/FindUPX.cmake
+++ b/Source/WXDialog/bin/FindUPX.cmake
@@ -5,14 +5,11 @@
# UPX_FOUND Is set to 1 when upx is found
FIND_PATH(UPX_PROGRAM_PATH upx.exe
- "c:\Program Files\upx"
- "d:\Program Files\upx"
- "e:\Program Files\upx"
- "f:\Program Files\upx"
- "g:\Program Files\upx"
- "h:\Program Files\upx"
+ ${UPX_DIR}
+ $ENV{UPX_DIR}
+ "$ENV{ProgramFiles}/upx"
)
-
+
# when found, note this as target
IF(UPX_PROGRAM_PATH)
SET(UPX_FOUND 1)
diff --git a/Source/WXDialog/bin/FindwxW.cmake b/Source/WXDialog/bin/FindwxW.cmake
index 230bba8..f88eb0e 100644
--- a/Source/WXDialog/bin/FindwxW.cmake
+++ b/Source/WXDialog/bin/FindwxW.cmake
@@ -1,3 +1,6 @@
+
+MESSAGE("${CMAKE_CURRENT_FILE} is deprecated, please use FindwxWidgets.cmake instead.")
+
#
# FindwxW.cmake
# v1.01 2005-05-27
@@ -14,6 +17,7 @@
# WXWIDGETS_INCLUDE_DIR = all include path of wxWindows
# WXWIDGETS_DEFINITIONS = all flags of wxWindows
+
# NOTE: This module REQUIRES that an environment variable named WXWIN
# be set to the base wxWidgets installation directory.
# Under Unix, you must also set and environment variable named WXWINCFG
diff --git a/Source/WXDialog/bin/FindwxWin.cmake b/Source/WXDialog/bin/FindwxWin.cmake
index 699e7e1..7278dca 100644
--- a/Source/WXDialog/bin/FindwxWin.cmake
+++ b/Source/WXDialog/bin/FindwxWin.cmake
@@ -1,3 +1,8 @@
+
+
+MESSAGE("${CMAKE_CURRENT_FILE} is deprecated, please use FindwxWidgets.cmake instead.")
+
+
##---------------------------------------------------------------------------
## $RCSfile$
## $Source$
diff --git a/Source/WXDialog/bin/UsewxW.cmake b/Source/WXDialog/bin/UsewxW.cmake
index e550e89..702ab9d 100644
--- a/Source/WXDialog/bin/UsewxW.cmake
+++ b/Source/WXDialog/bin/UsewxW.cmake
@@ -1,3 +1,7 @@
+
+MESSAGE("${CMAKE_CURRENT_FILE} is deprecated, please use FindwxWidgets.cmake instead.")
+
+
#
# UsewxW.cmake
# v1.0 2005-05-27