fixed msvc build

This commit is contained in:
Patrick von Reth 2010-12-30 01:02:30 +01:00
parent 7000c85efe
commit defebd7c2c
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,5 @@
project( SnoreNotify ) project( SnoreNotify )
cmake_minimum_required( VERSION 2.8 ) cmake_minimum_required( VERSION 2.8 )
add_definitions( -Wall )
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules ${CMAKE_PREFIX_PATH}/share/apps/cmake/modules) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules ${CMAKE_PREFIX_PATH}/share/apps/cmake/modules)
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
@ -17,6 +16,7 @@ include_directories(
if (CMAKE_COMPILER_IS_GNUCXX) if (CMAKE_COMPILER_IS_GNUCXX)
add_definitions( -Wall )
set (KDE4_ENABLE_EXCEPTIONS -fexceptions) set (KDE4_ENABLE_EXCEPTIONS -fexceptions)
# Select flags. # Select flags.
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")

View File

@ -17,6 +17,10 @@ endif(WIN32)
automoc4_add_executable( snorenotify ${WIN32_SPECIFIC} main.cpp trayicon.cpp ${SNORENOTIFY_DEPS}) automoc4_add_executable( snorenotify ${WIN32_SPECIFIC} main.cpp trayicon.cpp ${SNORENOTIFY_DEPS})
target_link_libraries( snorenotify snorecore ${QT_QTGUI_LIBRARY} ) target_link_libraries( snorenotify snorecore ${QT_QTGUI_LIBRARY} )
if(MSVC)
set_target_properties(snorenotify PROPERTIES LINK_FLAGS "/ENTRY:\"mainCRTStartup\"")
endif(MSVC)
add_dependencies(snorenotify snorecore) add_dependencies(snorenotify snorecore)
install(TARGETS snorenotify RUNTIME DESTINATION bin install(TARGETS snorenotify RUNTIME DESTINATION bin