summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
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)