diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-07-29 17:36:50 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-07-29 17:36:50 (GMT) |
commit | 4faaf7c877b962015ad27e4d0a14026b3ec251c1 (patch) | |
tree | a0cc6dd134a94aa5a9c37200005406fb1128cafe /Modules | |
parent | 2f58c28e6d5c471a3e9e8d45654dd5be97125bc9 (diff) | |
download | CMake-4faaf7c877b962015ad27e4d0a14026b3ec251c1.zip CMake-4faaf7c877b962015ad27e4d0a14026b3ec251c1.tar.gz CMake-4faaf7c877b962015ad27e4d0a14026b3ec251c1.tar.bz2 |
ENH: Add Use file for wxWindows. Thanks Jan Woetzel
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Use_wxWindows.cmake | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/Modules/Use_wxWindows.cmake b/Modules/Use_wxWindows.cmake new file mode 100644 index 0000000..d38c5d2 --- /dev/null +++ b/Modules/Use_wxWindows.cmake @@ -0,0 +1,49 @@ +##
+## This convenience include finds if wxWindows is installed
+## and set the appropriate libs, incdirs, flags etc.
+
+## author Jan Woetzel <jw -at- mip.informatik.uni-kiel.de> (07/2003)
+##
+## -----------------------------------------------------
+## USAGE:
+## just include Use_wxWindows.cmake
+## in your projects CMakeLists.txt
+## INCLUDE( ${CMAKE_ROOT}/Modules/Use_wxWindows.cmake)
+##
+## if you are sure you need GL then
+## SET(WXWINDOWS_USE_GL 1)
+## *before* you include this file.
+##
+## -----------------------------------------------------
+
+
+
+INCLUDE(${CMAKE_ROOT}/Modules/FindwxWindows.cmake)
+
+IF(WXWINDOWS_FOUND)
+
+ #MESSAGE("DBG Use_wxWindows.cmake: WXWINDOWS_INCLUDE_DIR=${WXWINDOWS_INCLUDE_DIR} WXWINDOWS_LINK_DIRECTORIES=${WXWINDOWS_LINK_DIRECTORIES} WXWINDOWS_LIBRARIES=${WXWINDOWS_LIBRARIES} CMAKE_WXWINDOWS_CXX_FLAGS=${CMAKE_WXWINDOWS_CXX_FLAGS} WXWINDOWS_DEFINITIONS=${WXWINDOWS_DEFINITIONS}")
+
+ IF(WXWINDOWS_INCLUDE_DIR)
+ INCLUDE_DIRECTORIES(${WXWINDOWS_INCLUDE_DIR})
+ ENDIF(WXWINDOWS_INCLUDE_DIR)
+
+ IF(WXWINDOWS_LINK_DIRECTORIES)
+ LINK_DIRECTORIES(${WXWINDOWS_LINK_DIRECTORIES})
+ ENDIF(WXWINDOWS_LINK_DIRECTORIES)
+
+ IF(WXWINDOWS_LIBRARIES)
+ LINK_LIBRARIES(${WXWINDOWS_LIBRARIES})
+ ENDIF(WXWINDOWS_LIBRARIES)
+
+ IF (CMAKE_WXWINDOWS_CXX_FLAGS)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_WXWINDOWS_CXX_FLAGS}")
+ ENDIF(CMAKE_WXWINDOWS_CXX_FLAGS)
+
+ IF(WXWINDOWS_DEFINITIONS)
+ ADD_DEFINITIONS(${WXWINDOWS_DEFINITIONS})
+ ENDIF(WXWINDOWS_DEFINITIONS)
+
+ELSE(WXWINDOWS_FOUND)
+ MESSAGE(SEND_ERROR "wxWindows not found by Use_wxWindows.cmake")
+ENDIF(WXWINDOWS_FOUND)
|