43 lines
1.1 KiB
CMake
43 lines
1.1 KiB
CMake
INCLUDE (${CMAKE_ROOT}/Modules/FindwxWindows.cmake)
|
|
|
|
IF ( CMAKE_WX_CAN_COMPILE )
|
|
|
|
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)
|
|
|
|
IF(WIN32)
|
|
SET(WIN32_EXECUTABLE WIN32)
|
|
ENDIF(WIN32)
|
|
|
|
ADD_EXECUTABLE(wxCMakeSetup ${WIN32_EXECUTABLE} ${WX_SRCS})
|
|
TARGET_LINK_LIBRARIES(wxCMakeSetup ${WXWINDOWS_LIBRARY})
|
|
TARGET_LINK_LIBRARIES(wxCMakeSetup CMakeLib)
|
|
|
|
INSTALL_TARGETS(/bin wxCMakeSetup)
|
|
|
|
IF(BUILD_TESTING)
|
|
ADD_TEST(wxCMakeSetupRunTest
|
|
${CMake_BINARY_DIR}/Source/wxCMakeSetup
|
|
-Q -A:ON -B:${CMake_BINARY_DIR}/Tests/Simple
|
|
-H:${CMake_SOURCE_DIR}/Tests/Simple)
|
|
ENDIF(BUILD_TESTING)
|
|
ELSE ( CMAKE_WX_CAN_COMPILE )
|
|
|
|
MESSAGE("Cannot find wxWindows libraries and/or header files")
|
|
|
|
ENDIF ( CMAKE_WX_CAN_COMPILE )
|