QGIS/external/qt-unix-signals/CMakeLists.txt

38 lines
1.1 KiB
CMake
Raw Normal View History

2020-11-11 11:15:34 +01:00
cmake_policy (SET CMP0048 NEW)
2019-03-28 09:46:56 +10:00
project(QTSignals VERSION 0.1)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
2020-11-11 11:15:34 +01:00
set(QTSignal_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "QTSignal Include Dir")
find_package(Qt5Core REQUIRED)
if (Qt5_POSITION_INDEPENDENT_CODE)
2020-11-11 11:15:34 +01:00
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif(Qt5_POSITION_INDEPENDENT_CODE)
2020-11-11 11:15:34 +01:00
set(CMAKE_CXX_STANDARD 11)
option(CMAKE_ENABLE "Enable automatic path configuration" ON)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
2020-11-11 11:15:34 +01:00
unset(CMAKE_CXX_VISIBILITY_PRESET)
include_directories(${Qt5Core_INCLUDE_DIRS})
add_library(QTSignal STATIC sigwatch.cpp)
target_link_libraries (QTSignal ${Qt5Core_LIBRARIES})
#option(WITH_EXAMPLE "Build example executable" ON)
#if (WITH_EXAMPLE)
# add_executable (sigwatch-demo example.cpp )
# target_link_libraries (sigwatch-demo
# QTSignal
# )
#endif(WITH_EXAMPLE)