1
0
This repository has been archived on 2024-09-13. You can view files and clone it, but cannot push or open issues or pull requests.
qtjsonsettings/CMakeLists.txt

52 lines
1.1 KiB
CMake
Raw Normal View History

2011-03-05 20:37:24 +00:00
cmake_minimum_required(VERSION 2.6)
set(CMAKE_DEBUG_POSTFIX _debug)
# Declare project
project(qtjsonsettings)
2015-06-05 07:38:12 +00:00
find_package(Qt5 REQUIRED)
2011-03-05 20:37:24 +00:00
set(QT_DONTUSE_QTGUI TRUE)
include(${QT_USE_FILE})
message("Building project ${PROJECT_NAME}")
message("
Configuration
-------------
CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}
CXXFLAGS = $ENV{CXXFLAGS}
CMAKE_CXX_FLAGS = ${CMAKE_CXX_FLAGS}
LDFLAGS = $ENV{LDFLAGS}
CMAKE_EXE_LINKER_FLAGS = ${CMAKE_EXE_LINKER_FLAGS}
CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}
")
message("You are linking ${PROJECT_NAME}. I hope it makes your life easier.")
# 3rdparty
# SOURCE FILES AND DIRECTORIES
# simple sources
2015-06-05 07:38:12 +00:00
list(APPEND qtjsonsettings_SOURCES qtjsonsettings.cpp)
2011-03-05 20:37:24 +00:00
# simple headers
list(APPEND qtjsonsettings_Q_HEADERS qtjsonsettings.h)
# if you use Q_OBJECT
2015-06-05 07:38:12 +00:00
qt5_wrap_cpp(qtjsonsettings_MOC_SOURCES ${qtjsonsettings_Q_HEADERS})
2011-03-05 20:37:24 +00:00
# COMPILATION
add_library(${PROJECT_NAME} STATIC
${qtjsonsettings_SOURCES}
${qtjsonsettings_MOC_SOURCES}
${qtjsonsettings_HEADERS}
${qtjsonsettings_Q_HEADERS}
)
# LINKING
# main library
target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES})