X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=gui%2FCMakeLists.txt;h=03e3d39ce78c2d1ecd1310957bbcbd94a8410b0d;hb=1c3144b7f0d37ae3909bd1a854ede6a0aa3ea20d;hp=8968cb4852f2c52eff7e328f7f822b59941864fa;hpb=1f94577d8c4b1c1a2a1a8f3dceb0daac02dd72b7;p=apitrace diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 8968cb4..03e3d39 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -58,23 +58,41 @@ QT4_WRAP_UI(qapitrace_UIS_H ${qapitrace_UIS}) #add_app_icon(qapitrace_SRCS ../icons/hi*-qapitrace.png) link_directories(${LINK_DIRECTORIES} ${QJSON_LIBRARY_DIRS}) -include_directories(${QT_INCLUDES} ${QJSON_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/..) +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR} + ${QJSON_INCLUDE_DIR} + ${QT_INCLUDES} +) + +if (WIN32) + # Use Windows subsystem (i.e., no console). + set (qapitrace_SUBSYSTEM "WIN32") +endif () -add_executable(qapitrace ${qapitrace_SRCS} ${qapitrace_UIS_H}) +add_executable(qapitrace ${qapitrace_SUBSYSTEM} ${qapitrace_SRCS} ${qapitrace_UIS_H}) target_link_libraries (qapitrace + image common - ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${SNAPPY_LIBRARIES} ${QJSON_LIBRARIES} ${QT_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} ) -# Recent builds of Qt no longer support i386 architecture if (APPLE) + # Recent builds of Qt no longer support i386 architecture set_target_properties (qapitrace PROPERTIES OSX_ARCHITECTURES x86_64) endif () +if (MSVC) + # When the Windows subsystem is chosen by default MSVC expects WinMain() + # entry point, but we rather use plain old main() everywhere. + set_target_properties (qapitrace PROPERTIES LINK_FLAGS "/ENTRY:mainCRTStartup") +endif () + ########### install files ###############