Cleanup of CMakeLists.txt files.

- Bumped required cmake version to 3.9.
 - Added Appveyor CI YAML file for Windows builds
This commit is contained in:
Jim Evins
2018-12-19 23:23:59 -05:00
parent 375c9573f1
commit fe6dcd6a7f
7 changed files with 72 additions and 27 deletions
+45
View File
@@ -0,0 +1,45 @@
version: 3.99.0.{build}
branches:
# blacklist
except:
- /.*/
# whitelist
only:
- master
skip_tags: true
image: Visual Studio 2017
init:
- git config --global core.autocrlf true
install:
- set QTDIR=c:\Qt\5.11\msvc2017_64
- set PATH=%PATH%;%QTDIR%/bin
build_script:
- mkdir build
- cd build
- cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_PREFIX_PATH=%QTDIR% ..
- cmake --build . --config Release
- ctest -C Release
- cpack -C Release -G NSIS64
artifacts:
- path: build\glabels-3.99.0-win64.exe
name: windows-installer
deploy:
- provider: GitHub
release: windows-continuous
artifact: windows-installer
auth_token:
secure: mPNNgwWP58gu4eA2wVwGkGWNTzJigKj1g/XjsZ9vk03rLMmf5fxC/XNr15fPBCi8
draft: false
prerelease: true
force_update: true
on:
branch: master
+6 -1
View File
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2) cmake_minimum_required (VERSION 3.9)
############################################################################### ###############################################################################
# gLabels Label Designer Project # gLabels Label Designer Project
@@ -108,12 +108,16 @@ find_package (Qt5Test 5.4 QUIET)
#======================================= #=======================================
# Global compiler options # Global compiler options
#======================================= #=======================================
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
# #
# Uncomment to compile everything with aggressively pedantic options # Uncomment to compile everything with aggressively pedantic options
# (not recommended -- only for testing -- also not portable) # (not recommended -- only for testing -- also not portable)
# #
#add_compile_options("-Wall" "-Werror" "-Wpedantic") #add_compile_options("-Wall" "-Werror" "-Wpedantic")
# Uncomment to always compile with debug symbols
add_compile_options("-g") add_compile_options("-g")
endif ()
#======================================= #=======================================
@@ -144,6 +148,7 @@ message (STATUS "Project name ............ " ${CMAKE_PROJECT_NAME})
message (STATUS "Project version ......... " ${VERSION_STRING}) message (STATUS "Project version ......... " ${VERSION_STRING})
message (STATUS "Installation prefix ..... " ${CMAKE_INSTALL_PREFIX}) message (STATUS "Installation prefix ..... " ${CMAKE_INSTALL_PREFIX})
message (STATUS "Source code location .... " ${glabels_SOURCE_DIR}) message (STATUS "Source code location .... " ${glabels_SOURCE_DIR})
message (STATUS "CMake version ........... " ${CMAKE_VERSION})
message (STATUS "C++ Compiler ............ " ${CMAKE_CXX_COMPILER_ID} " " ${CMAKE_CXX_COMPILER} " " ${CMAKE_CXX_COMPILER_VERSION}) message (STATUS "C++ Compiler ............ " ${CMAKE_CXX_COMPILER_ID} " " ${CMAKE_CXX_COMPILER} " " ${CMAKE_CXX_COMPILER_VERSION})
message (STATUS "Qt version .............. " ${Qt5Core_VERSION}) message (STATUS "Qt version .............. " ${Qt5Core_VERSION})
+3 -4
View File
@@ -14,10 +14,9 @@ add_executable (glabels-batch-qt WIN32
${glabels-batch_sources} ${glabels-batch_sources}
) )
#target_compile_features (glabels-batch-qt target_compile_features (glabels-batch-qt
# PUBLIC cxx_std_11 PUBLIC cxx_std_11
#) )
set_property (TARGET glabels-batch-qt PROPERTY CXX_STANDARD 11)
target_link_libraries (glabels-batch-qt target_link_libraries (glabels-batch-qt
Model Model
+3 -4
View File
@@ -120,10 +120,9 @@ add_executable (glabels-qt WIN32
${glabels_win_rc} ${glabels_win_rc}
) )
#target_compile_features (glabels-qt target_compile_features (glabels-qt
# PUBLIC cxx_std_11 PUBLIC cxx_std_11
#) )
set_property (TARGET glabels-qt PROPERTY CXX_STANDARD 11)
target_include_directories (glabels-qt target_include_directories (glabels-qt
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
+3 -4
View File
@@ -33,10 +33,9 @@ add_library (glbarcode STATIC
${GLBARCODE_SOURCES} ${GLBARCODE_SOURCES}
) )
#target_compile_features (glbarcode target_compile_features (glbarcode
# PUBLIC cxx_std_11 PUBLIC cxx_std_11
#) )
set_property (TARGET glbarcode PROPERTY CXX_STANDARD 11)
target_include_directories (glbarcode target_include_directories (glbarcode
PUBLIC .. PUBLIC ..
+3 -4
View File
@@ -92,10 +92,9 @@ add_library (Model STATIC
${Model_moc_sources} ${Model_moc_sources}
) )
#target_compile_features (Model target_compile_features (Model
# PUBLIC cxx_std_11 PUBLIC cxx_std_11
#) )
set_property (TARGET Model PROPERTY CXX_STANDARD 11)
target_include_directories (Model target_include_directories (Model
PUBLIC .. ${CMAKE_CURRENT_BINARY_DIR}/.. PUBLIC .. ${CMAKE_CURRENT_BINARY_DIR}/..
+3 -4
View File
@@ -45,10 +45,9 @@ add_executable (XmlStrings WIN32
XmlStrings.cpp XmlStrings.cpp
) )
#target_compile_features (Model target_compile_features (Model
# PUBLIC cxx_std_11 PUBLIC cxx_std_11
#) )
set_property (TARGET XmlStrings PROPERTY CXX_STANDARD 11)
target_link_libraries (XmlStrings target_link_libraries (XmlStrings
Qt5::Core Qt5::Core