summaryrefslogtreecommitdiffstats
path: root/Modules/FindwxWindows.cmake
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-08-08 19:30:17 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-08-08 19:30:17 (GMT)
commit7cdee27a012e0f5be9a4bc70638b9e0a010011df (patch)
tree8434c0a6be0f2e4cf5fd0b965935430235c01463 /Modules/FindwxWindows.cmake
parenta898cfb17aabc7e54033208e760de8e237e2d2b1 (diff)
downloadCMake-7cdee27a012e0f5be9a4bc70638b9e0a010011df.zip
CMake-7cdee27a012e0f5be9a4bc70638b9e0a010011df.tar.gz
CMake-7cdee27a012e0f5be9a4bc70638b9e0a010011df.tar.bz2
Add UNIX support for WXWINDOWS
Diffstat (limited to 'Modules/FindwxWindows.cmake')
-rw-r--r--Modules/FindwxWindows.cmake49
1 files changed, 29 insertions, 20 deletions
diff --git a/Modules/FindwxWindows.cmake b/Modules/FindwxWindows.cmake
index b01e9e4..8e0b08c 100644
--- a/Modules/FindwxWindows.cmake
+++ b/Modules/FindwxWindows.cmake
@@ -7,33 +7,42 @@
# WXWINDOWS_SHARED_LIBRARY = full path to the wxWindows shared import library
# WXWINDOWS_INCLUDE_PATH = path to wx.h
-SET (WXWINDOWS_POSSIBLE_LIB_PATHS
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWindows_is1;Inno Setup: App Path]/lib"
- $ENV{WXWIN}/lib
-)
+IF(WINDOWS)
+ SET (WXWINDOWS_POSSIBLE_LIB_PATHS
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWindows_is1;Inno Setup: App Path]/lib"
+ $ENV{WXWIN}/lib
+ )
-FIND_LIBRARY(WXWINDOWS_STATIC_LIBRARY
- NAMES wx
- PATHS ${WXWINDOWS_POSSIBLE_LIB_PATHS}
-)
+ FIND_LIBRARY(WXWINDOWS_STATIC_LIBRARY
+ NAMES wx
+ PATHS ${WXWINDOWS_POSSIBLE_LIB_PATHS}
+ )
-FIND_LIBRARY(WXWINDOWS_SHARED_LIBRARY
- NAMES wx23_2 wx22_9
- PATHS ${WXWINDOWS_POSSIBLE_LIB_PATHS}
-)
+ FIND_LIBRARY(WXWINDOWS_SHARED_LIBRARY
+ NAMES wx23_2 wx22_9
+ PATHS ${WXWINDOWS_POSSIBLE_LIB_PATHS}
+ )
-SET (WXWINDOWS_POSSIBLE_INCLUDE_PATHS
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWindows_is1;Inno Setup: App Path]/include/wx"
- $ENV{WXWIN}/include/wx
-)
+ SET (WXWINDOWS_POSSIBLE_INCLUDE_PATHS
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWindows_is1;Inno Setup: App Path]/include/wx"
+ $ENV{WXWIN}/include/wx
+ )
-FIND_PATH(WXWINDOWS_INCLUDE_PATH
- wx.h
- ${WXWINDOWS_POSSIBLE_INCLUDE_PATHS}
-)
+ FIND_PATH(WXWINDOWS_INCLUDE_PATH
+ wx.h
+ ${WXWINDOWS_POSSIBLE_INCLUDE_PATHS}
+ )
+ELSE(WINDOWS)
+ FIND_PROGRAM(CMAKE_WX_CONFIG wx-config)
+ EXEC_PROGRAM(wx-config ARGS --cflags OUTPUT_VARIABLE WXWINDOWS_COMPILE_FLAGS)
+ EXEC_PROGRAM(wx-config ARGS --libs OUTPUT_VARIABLE WXWINDOWS_LINK_FLAGS)
+ SET(CMAKE_WX_CXX_FLAGS "`${CMAKE_WX_CONFIG} --cflags`")
+ SET(CMAKE_WX_LIBRARIES "`${CMAKE_WX_CONFIG} --libs`")
+ENDIF(WINDOWS)
MARK_AS_ADVANCED(
WXWINDOWS_STATIC_LIBRARY
WXWINDOWS_SHARED_LIBRARY
WXWINDOWS_INCLUDE_PATH
+ WXWINDOWS_SETUP_INCLUDE_PATH
)