summaryrefslogtreecommitdiffstats
path: root/Source/WXDialog/bin/UsewxW.cmake
diff options
context:
space:
mode:
authorJorgen Bodde <jorgb@xs4all.nl>2005-06-30 19:54:59 (GMT)
committerJorgen Bodde <jorgb@xs4all.nl>2005-06-30 19:54:59 (GMT)
commit6a1de7f5ad2f684fdf8bfdea2a3ad982387e9a27 (patch)
tree496a106d3faf5f09d364536d7d6e64c5449d47d3 /Source/WXDialog/bin/UsewxW.cmake
parent8c28e4e9f0b82ec96b4b68c370a8fc50333b093c (diff)
downloadCMake-6a1de7f5ad2f684fdf8bfdea2a3ad982387e9a27.zip
CMake-6a1de7f5ad2f684fdf8bfdea2a3ad982387e9a27.tar.gz
CMake-6a1de7f5ad2f684fdf8bfdea2a3ad982387e9a27.tar.bz2
initial checkin for bin dir
Diffstat (limited to 'Source/WXDialog/bin/UsewxW.cmake')
-rw-r--r--Source/WXDialog/bin/UsewxW.cmake76
1 files changed, 76 insertions, 0 deletions
diff --git a/Source/WXDialog/bin/UsewxW.cmake b/Source/WXDialog/bin/UsewxW.cmake
new file mode 100644
index 0000000..e550e89
--- /dev/null
+++ b/Source/WXDialog/bin/UsewxW.cmake
@@ -0,0 +1,76 @@
+#
+# UsewxW.cmake
+# v1.0 2005-05-27
+# Jerry Fath 2005
+# Based on work by Jorgen Bodde
+#
+
+#
+# wxWidgets CMake helper
+#
+
+# These project specific variables should be set before including this file
+#PROJECT_NAME
+#PROJECT_SOURCE_FILES
+#PROJECT_SOURCE_DIR
+#PROJECT_BINARY_DIR
+# These variables can be set to add addition directories, libraries, and definitions
+#PROJECT_DEFINITIONS
+#PROJECT_INCLUDE_PATH
+#PROJECT_LINK_DIRECTORIES
+#PROJECT_LIBRARIES
+
+#These WX specific variable should be set by FindwxW.cmake before including this file
+# WXWIDGETS_LINK_DIRECTORIES = link directories, useful for rpath on Unix
+# WXWIDGETS_LIBRARIES = all the wxWindows libraries ( and linker flags on unix )
+# WXWIDGETS_CXX_FLAGS = compiler flags for building wxWindows
+# WXWIDGETS_INCLUDE_DIR = all include path of wxWindows
+# WXWIDGETS_DEFINITIONS = all flags of wxWindows
+
+
+#
+# The flags for the compiler are stored in WXWIDGETS_CXX_FLAGS, we will set those so that
+# we know we will always compile wxWidgets programs properly. In case of debugging, we
+# will add the __WXDEBUG__ and WXDEBUG flags as well. For linux, you might want LINUX
+# to be defined.
+#
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}${WXWIDGETS_CXX_FLAGS}")
+
+ADD_DEFINITIONS( ${WXWIDGETS_DEFINITIONS} ${PROJECT_DEFINITIONS} )
+
+#
+# The include dirs
+#
+INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}
+ ${PROJECT_INCLUDE_PATH}
+ ${WXWIDGETS_INCLUDE_DIR})
+
+#
+# This is needed to tell CMake what directories contain the libraries we need. This will
+# allow us to just specify the lib files without prepending them with a full path to that
+# library
+#
+LINK_DIRECTORIES( ${WXWIDGETS_LINK_DIRECTORIES} ${PROJECT_LINK_DIRECTORIES})
+
+#
+# This is our target. As you can see, we specify WIN32 for windows makefiles. In Linux and
+# other OS'es this flag is ignored. Under windows it will make sure we generate a Win32 file with GUI.
+#
+ADD_EXECUTABLE(${PROJECT_NAME} WIN32 ${PROJECT_SOURCE_FILES} ${PROJECT_RC_FILE})
+
+#
+# Here we specify what libraries are linked to our project
+#
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${WXWIDGETS_LIBRARIES} ${PROJECT_LIBRARIES})
+
+#
+# Log results
+#
+FILE( WRITE "${PROJECT_BINARY_DIR}/usewxw.log" "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}\n" )
+FILE( APPEND "${PROJECT_BINARY_DIR}/usewxw.log" "Definitions: ${WXWIDGETS_DEFINITIONS} ${PROJECT_DEFINITIONS}\n" )
+FILE( APPEND "${PROJECT_BINARY_DIR}/usewxw.log" "INCLUDE_DIRECTORIES: ${PROJECT_SOURCE_DIR} ${PROJECT_INCLUDE_PATH} ${WXWIDGETS_INCLUDE_DIR}\n" )
+FILE( APPEND "${PROJECT_BINARY_DIR}/usewxw.log" "LINK_DIRECTORIES: ${WXWIDGETS_LINK_DIRECTORIES} ${PROJECT_LINK_DIRECTORIES}\n" )
+FILE( APPEND "${PROJECT_BINARY_DIR}/usewxw.log" "TARGET_LINK_LIBRARIES: ${PROJECT_NAME} ${WXWIDGETS_LIBRARIES} ${PROJECT_LIBRARIES}\n" )
+FILE( APPEND "${PROJECT_BINARY_DIR}/usewxw.log" "Sources: ${PROJECT_SOURCE_FILES}\n" )
+
+