2002-09-19 17:47:18 +04:00
|
|
|
INCLUDE (${CMAKE_ROOT}/Modules/FindwxWindows.cmake)
|
|
|
|
|
2003-07-30 21:14:14 +04:00
|
|
|
IF ( CMAKE_WX_CAN_COMPILE )
|
2002-09-19 17:47:18 +04:00
|
|
|
|
|
|
|
SET( WX_SRCS
|
|
|
|
cmWXCacheProperty.cxx
|
|
|
|
cmWXCommandLineInfo.cxx
|
|
|
|
cmWXMainFrame.cxx
|
|
|
|
wxCMakeSetup.cxx
|
|
|
|
)
|
|
|
|
|
|
|
|
IF(WXWINDOWS_INCLUDE_PATH)
|
|
|
|
INCLUDE_DIRECTORIES(${WXWINDOWS_INCLUDE_PATH})
|
|
|
|
ENDIF(WXWINDOWS_INCLUDE_PATH)
|
|
|
|
|
|
|
|
IF(CMAKE_WX_CXX_FLAGS)
|
|
|
|
SET(CMAKE_CXX_FLAGS "${CMAKE_WX_CXX_FLAGS} ${CMAKE_CXX_FLAGS}")
|
|
|
|
ENDIF(CMAKE_WX_CXX_FLAGS)
|
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES(${CMake_SOURCE_DIR}/Source)
|
|
|
|
|
2002-09-19 18:56:24 +04:00
|
|
|
IF(WIN32)
|
|
|
|
SET(WIN32_EXECUTABLE WIN32)
|
|
|
|
ENDIF(WIN32)
|
|
|
|
|
|
|
|
ADD_EXECUTABLE(wxCMakeSetup ${WIN32_EXECUTABLE} ${WX_SRCS})
|
2002-09-19 17:47:18 +04:00
|
|
|
TARGET_LINK_LIBRARIES(wxCMakeSetup ${WXWINDOWS_LIBRARY})
|
|
|
|
TARGET_LINK_LIBRARIES(wxCMakeSetup CMakeLib)
|
|
|
|
|
2002-11-04 22:50:32 +03:00
|
|
|
IF(APPLE)
|
|
|
|
SET(APPLE_GUI_EXECUTABLE wxCMakeSetup)
|
2003-02-14 05:57:05 +03:00
|
|
|
SET(APPLE_GUI_INFO_STRING "CMake version ${CMake_VERSION_MAJOR}, (c) 2003 Kitware Inc.")
|
2002-11-04 22:50:32 +03:00
|
|
|
SET(APPLE_GUI_IDENTIFIER "com.kitware.wxCMakeSetup")
|
2003-02-14 05:57:05 +03:00
|
|
|
SET(APPLE_GUI_LONG_VERSION_STRING "${CMake_VERSION_MAJOR}, (c) 2003 Kitware Inc.")
|
2002-11-04 22:50:32 +03:00
|
|
|
SET(APPLE_GUI_BUNDLE_NAME "CMake")
|
2003-02-14 05:57:05 +03:00
|
|
|
SET(APPLE_GUI_SHORT_VERSION_STRING "${CMake_VERSION_MAJOR}")
|
|
|
|
SET(APPLE_GUI_BUNDLE_VERSION "${CMake_VERSION_MAJOR}")
|
2002-11-07 00:05:14 +03:00
|
|
|
SET(APPLE_GUI_ICON "CMakeIcon.icns")
|
2002-11-04 22:50:32 +03:00
|
|
|
SET(APPLE_GUI_COPYRIGHT "Copyright 2002 Kitware Inc.")
|
2003-02-06 00:17:49 +03:00
|
|
|
CONFIGURE_FILE(${CMake_SOURCE_DIR}/Templates/AppleInfo.plist
|
2002-11-04 22:50:32 +03:00
|
|
|
${EXECUTABLE_OUTPUT_PATH}/CMake.app/Contents/Info.plist)
|
2002-11-07 00:05:14 +03:00
|
|
|
CONFIGURE_FILE(${CMake_SOURCE_DIR}/Source/WXDialog/CMakeIcon.icns
|
|
|
|
${EXECUTABLE_OUTPUT_PATH}/CMake.app/Contents/Resources/CMakeIcon.icns COPYONLY)
|
2002-11-05 17:38:34 +03:00
|
|
|
MAKE_DIRECTORY(${EXECUTABLE_OUTPUT_PATH}/CMake.app/Contents/MacOS)
|
2002-11-04 23:01:55 +03:00
|
|
|
#WRITE_FILE(${EXECUTABLE_OUTPUT_PATH}/CMake.app/Contents/PkgInfo "APPL????")
|
2002-11-04 23:21:15 +03:00
|
|
|
ADD_EXECUTABLE(CMake.app/Contents/MacOS/wxCMakeSetup ${WIN32_EXECUTABLE} ${WX_SRCS})
|
|
|
|
TARGET_LINK_LIBRARIES(CMake.app/Contents/MacOS/wxCMakeSetup ${WXWINDOWS_LIBRARY})
|
|
|
|
TARGET_LINK_LIBRARIES(CMake.app/Contents/MacOS/wxCMakeSetup CMakeLib)
|
|
|
|
|
2002-11-04 22:50:32 +03:00
|
|
|
ADD_CUSTOM_COMMAND(
|
2002-11-04 23:21:15 +03:00
|
|
|
SOURCE CMake.app/Contents/MacOS/wxCMakeSetup
|
2002-11-04 22:50:32 +03:00
|
|
|
COMMAND ${CMAKE_COMMAND}
|
2003-01-06 18:37:47 +03:00
|
|
|
ARGS -E chdir "\"${EXECUTABLE_OUTPUT_PATH}/CMake.app/Contents/MacOS\""
|
2002-11-04 22:50:32 +03:00
|
|
|
`${CMAKE_WX_CONFIG} --rezflags`
|
2003-01-06 18:37:47 +03:00
|
|
|
"\"${EXECUTABLE_OUTPUT_PATH}/CMake.app/Contents/MacOS/wxCMakeSetup\""
|
2002-11-04 23:21:15 +03:00
|
|
|
TARGET CMake.app/Contents/MacOS/wxCMakeSetup
|
2002-11-04 23:01:55 +03:00
|
|
|
)
|
2002-11-04 22:50:32 +03:00
|
|
|
ENDIF(APPLE)
|
|
|
|
|
2002-09-19 17:47:18 +04:00
|
|
|
INSTALL_TARGETS(/bin wxCMakeSetup)
|
|
|
|
|
2002-09-20 01:35:59 +04:00
|
|
|
IF(BUILD_TESTING)
|
|
|
|
ADD_TEST(wxCMakeSetupRunTest
|
2003-07-31 16:55:22 +04:00
|
|
|
${EXECUTABLE_OUTPUT_PATH}/wxCMakeSetup
|
2002-09-20 01:35:59 +04:00
|
|
|
-Q -A:ON -B:${CMake_BINARY_DIR}/Tests/Simple
|
|
|
|
-H:${CMake_SOURCE_DIR}/Tests/Simple)
|
|
|
|
ENDIF(BUILD_TESTING)
|
2003-07-30 21:14:14 +04:00
|
|
|
ELSE ( CMAKE_WX_CAN_COMPILE )
|
2002-09-19 17:47:18 +04:00
|
|
|
|
|
|
|
MESSAGE("Cannot find wxWindows libraries and/or header files")
|
|
|
|
|
2003-07-30 21:14:14 +04:00
|
|
|
ENDIF ( CMAKE_WX_CAN_COMPILE )
|