summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-08-09 11:55:25 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-08-09 11:55:25 (GMT)
commita1e19675de10f7ca6cc14d1c10421f8b578d5d4e (patch)
tree096af2eb4f59a421013bafb0032dd54a199d6221 /Modules
parent7cdee27a012e0f5be9a4bc70638b9e0a010011df (diff)
downloadCMake-a1e19675de10f7ca6cc14d1c10421f8b578d5d4e.zip
CMake-a1e19675de10f7ca6cc14d1c10421f8b578d5d4e.tar.gz
CMake-a1e19675de10f7ca6cc14d1c10421f8b578d5d4e.tar.bz2
This hopefully finds wxWindows on UNIX
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindwxWindows.cmake20
1 files changed, 17 insertions, 3 deletions
diff --git a/Modules/FindwxWindows.cmake b/Modules/FindwxWindows.cmake
index 8e0b08c..cf48343 100644
--- a/Modules/FindwxWindows.cmake
+++ b/Modules/FindwxWindows.cmake
@@ -32,11 +32,25 @@ IF(WINDOWS)
wx.h
${WXWINDOWS_POSSIBLE_INCLUDE_PATHS}
)
+ IF(WXWINDOWS_SHARED_LIBRARY)
+ OPTION(WX_USE_SHARED_LIBS "Use shared versions of wxWindows libraries" ON)
+ IF(WXWINDOWS_SHARED_LIBRARY)
+ IF(WX_USE_SHARED_LIBS)
+ SET(WXWINDOWS_LIBRARY ${WXWINDOWS_SHARED_LIBRARY})
+ ELSE(WX_USE_SHARED_LIBS)
+ SET(WXWINDOWS_LIBRARY ${WXWINDOWS_STATIC_LIBRARY})
+ ENDIF(WX_USE_SHARED_LIBS)
+
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`")
+ # This has to be done at some point
+ #EXEC_PROGRAM(wx-config ARGS --cflags OUTPUT_VARIABLE WXWINDOWS_COMPILE_FLAGS RETURN_VALUE WX_CFLAGS_)
+ #EXEC_PROGRAM(wx-config ARGS --libs OUTPUT_VARIABLE WXWINDOWS_LINK_FLAGS RETURN_VALUE WX_LIBS_RVAL)
+ #IF(WX_CFLAGS_RVAL)
+ SET(CMAKE_WX_CXX_FLAGS "`${CMAKE_WX_CONFIG} --cflags`")
+ #ELSE(WX_CFLAGS_RVAL)
+ # MESSAGE("Cannot find \"wx-config\" or wxWindows is not configured properly")
+ #ENDIF(WX_CFLAGS_RVAL)
SET(CMAKE_WX_LIBRARIES "`${CMAKE_WX_CONFIG} --libs`")
ENDIF(WINDOWS)