Merge pull request #126 from ctrlaltca/cmake_qt5

Qt5 support
This commit is contained in:
Gavin Bisesi 2014-07-10 13:13:51 -04:00
commit f83d58309b
44 changed files with 703 additions and 159 deletions

View file

@ -28,7 +28,20 @@ SET(common_SOURCES
sfmt/SFMT.c
)
INCLUDE(${QT_USE_FILE})
set(ORACLE_LIBS)
# Qt4 stuff
if(Qt4_FOUND)
# Include directories
INCLUDE(${QT_USE_FILE})
include_directories(${QT_INCLUDES})
endif()
# qt5 stuff
if(Qt5Widgets_FOUND)
include_directories(${Qt5Widgets_INCLUDE_DIRS})
endif()
INCLUDE_DIRECTORIES(pb)
INCLUDE_DIRECTORIES(sfmt)
INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIR})

View file

@ -1,29 +0,0 @@
find_package(Git)
if(GIT_FOUND)
execute_process(
COMMAND ${GIT_EXECUTABLE} describe --long --always
RESULT_VARIABLE res_var
OUTPUT_VARIABLE GIT_COM_ID
)
if( NOT ${res_var} EQUAL 0 )
set( GIT_COMMIT_ID "git commit id unknown")
message( WARNING "Git failed (not a repo, or no tags). Build will not contain git revision info." )
endif()
string( REPLACE "\n" "" GIT_COMMIT_ID "${GIT_COM_ID}" )
else()
set( GIT_COMMIT_ID "unknown (git not found!)")
message( WARNING "Git not found. Build will not contain git revision info." )
endif()
set( hstring "extern const char *VERSION_STRING\;\n" )
set( cppstring "const char * VERSION_STRING = \"${GIT_COMMIT_ID}\"\;\n")
file(WRITE version_string.cpp.txt ${cppstring} )
file(WRITE version_string.h.txt ${hstring} )
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy_if_different version_string.h.txt ${CMAKE_CURRENT_BINARY_DIR}/version_string.h
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy_if_different version_string.cpp.txt ${CMAKE_CURRENT_BINARY_DIR}/version_string.cpp
)

View file

@ -2,6 +2,7 @@
#define SERVER_RESPONSE_CONTAINERS_H
#include <QPair>
#include <QList>
#include "pb/server_message.pb.h"
namespace google { namespace protobuf { class Message; } }