parent
ccc166214d
commit
e7d4039a1b
@ -1,29 +0,0 @@
|
||||
#
|
||||
# Write a pkg-config pc file for given "name" with "decription"
|
||||
# Arguments:
|
||||
# name: a library name (withoud "lib" prefix and "so" suffixes
|
||||
# desc: a desription string
|
||||
# requires: required libraries
|
||||
# include_rel_dir: include directory, relative to includedir
|
||||
# version: package version
|
||||
#
|
||||
macro (create_pkgconfig_file name desc requires include_rel_dir version)
|
||||
set(_pkgfname "${CMAKE_CURRENT_BINARY_DIR}/${name}.pc")
|
||||
message(STATUS "${name}: writing pkgconfig file ${_pkgfname}")
|
||||
|
||||
file(WRITE "${_pkgfname}"
|
||||
"prefix=${CMAKE_INSTALL_PREFIX}\n"
|
||||
"libdir=\${prefix}/${CMAKE_INSTALL_LIBDIR}\n"
|
||||
"includedir=\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}\n"
|
||||
"\n"
|
||||
"Name: ${name}\n"
|
||||
"Description: ${desc}\n"
|
||||
"Version: ${version}\n"
|
||||
"Requires: ${requires}\n"
|
||||
"Libs: -L\${libdir} -l${name}\n"
|
||||
"Cflags: -I\${includedir} -I\${includedir}/${include_rel_dir}\n"
|
||||
"\n"
|
||||
)
|
||||
|
||||
install(FILES ${_pkgfname} DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
endmacro()
|
@ -1,8 +0,0 @@
|
||||
|
||||
find_package(Qt4 REQUIRED QUIET)
|
||||
include(${QT_USE_FILE})
|
||||
|
||||
set(QTERMWIDGET_QT_LIBRARIES ${QT_LIBRARIES})
|
||||
|
||||
include_directories(${QTERMWIDGET_INCLUDE_DIRS})
|
||||
|
@ -1,41 +1,20 @@
|
||||
# - Find the QTermWidget include and library dirs and define a some macros
|
||||
#
|
||||
# The module defines the following variables
|
||||
# QTERMWIDGET_FOUND - Set to TRUE if all of the above has been found
|
||||
#
|
||||
# QTERMWIDGET_INCLUDE_DIR - The QTermWidget include directory
|
||||
#
|
||||
# QTERMWIDGET_INCLUDE_DIRS - The QTermWidget include directory
|
||||
#
|
||||
# QTERMWIDGET_LIBRARIES - The libraries needed to use QTermWidget
|
||||
#
|
||||
# QTERMWIDGET_USE_FILE - The variable QTERMWIDGET_USE_FILE is set which is the path
|
||||
# to a CMake file that can be included to compile qtermwidget
|
||||
# applications and libraries. It sets up the compilation
|
||||
# environment for include directories and populates a
|
||||
# QTERMWIDGET_LIBRARIES variable.
|
||||
#
|
||||
# QTERMWIDGET_QT_LIBRARIES - The Qt libraries needed by QTermWidget
|
||||
# - Find the QTermWidget include and library
|
||||
#
|
||||
# Typical usage:
|
||||
# find_package(QTERMWIDGET5)
|
||||
# find_package(QTermWidget5 REQUIRED)
|
||||
#
|
||||
# include(${QTERMWIDGET_USE_FILE})
|
||||
# add_executable(foo main.cpp)
|
||||
# target_link_libraries(foo ${QTERMWIDGET_QT_LIBRARIES} ${QTERMWIDGET_LIBRARIES})
|
||||
|
||||
set(QTERMWIDGET_INCLUDE_DIR @QTERMWIDGET_INCLUDE_DIR@)
|
||||
set(QTERMWIDGET_LIBRARY @QTERMWIDGET_LIBRARY_NAME@)
|
||||
|
||||
set(QTERMWIDGET_LIBRARIES ${QTERMWIDGET_LIBRARY})
|
||||
set(QTERMWIDGET_INCLUDE_DIRS "${QTERMWIDGET_INCLUDE_DIR}")
|
||||
# target_link_libraries(foo qtermwidget5)
|
||||
|
||||
set(QTERMWIDGET_USE_FILE "${CMAKE_CURRENT_LIST_DIR}/qtermwidget5_use.cmake")
|
||||
set(QTERMWIDGET_FOUND 1)
|
||||
@PACKAGE_INIT@
|
||||
|
||||
set(QTERMWIDGET_VERSION_MAJOR @QTERMWIDGET_VERSION_MAJOR@)
|
||||
set(QTERMWIDGET_VERSION_MINOR @QTERMWIDGET_VERSION_MINOR@)
|
||||
set(QTERMWIDGET_VERSION_PATCH @QTERMWIDGET_VERSION_PATCH@)
|
||||
set(QTERMWIDGET_VERSION @QTERMWIDGET_VERSION@)
|
||||
if (CMAKE_VERSION VERSION_LESS 3.0.2)
|
||||
message(FATAL_ERROR \"qtermwidget requires at least CMake version 3.0.2\")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(QTERMWIDGET_LIBRARY QTERMWIDGET_INCLUDE_DIR)
|
||||
if (NOT TARGET @QTERMWIDGET_LIBRARY_NAME@)
|
||||
if (POLICY CMP0024)
|
||||
cmake_policy(SET CMP0024 NEW)
|
||||
endif()
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/@QTERMWIDGET_LIBRARY_NAME@-targets.cmake")
|
||||
endif()
|
||||
|
@ -1,9 +0,0 @@
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
|
||||
include_directories(${Qt5Widgets_INCLUDE_DIRS})
|
||||
add_definitions(${Qt5Core_DEFINITIONS})
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
||||
set(QTERMWIDGET_QT_LIBRARIES ${Qt5Widgets_LIBRARIES})
|
||||
|
||||
include_directories(${QTERMWIDGET_INCLUDE_DIRS})
|
||||
|
Loading…
Reference in new issue