2016-02-02 20:28:34 +01:00
|
|
|
PROJECT(qucs-suite CXX)
|
2022-04-26 16:40:35 +03:00
|
|
|
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
|
|
|
|
cmake_policy(VERSION 3.0)
|
2013-06-02 20:00:43 +02:00
|
|
|
|
2016-06-24 17:11:00 +03:00
|
|
|
SET(QUCS_NAME "qucs-s")
|
2014-09-02 14:29:45 +02:00
|
|
|
|
|
|
|
file (STRINGS "${qucs-suite_SOURCE_DIR}/VERSION" QUCS_VERSION)
|
|
|
|
message(STATUS "Configuring Qucs: VERSION ${QUCS_VERSION}")
|
|
|
|
|
|
|
|
set(GIT unknown)
|
|
|
|
IF(EXISTS ${CMAKE_SOURCE_DIR}/../.git )
|
|
|
|
FIND_PACKAGE(Git)
|
|
|
|
# Get the latest abbreviated commit hash of the working branch
|
|
|
|
execute_process(
|
|
|
|
COMMAND ${GIT_EXECUTABLE} log --pretty=format:%h -n 1u
|
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
|
|
|
OUTPUT_VARIABLE GIT_COMMIT_HASH
|
|
|
|
)
|
|
|
|
set(GIT ${GIT_COMMIT_HASH})
|
|
|
|
message(STATUS "Found Git repository, last commit hash: ${GIT}")
|
|
|
|
ENDIF()
|
|
|
|
|
2014-08-20 16:02:03 +02:00
|
|
|
message(STATUS "${PROJECT_NAME} ${CMAKE_INSTALL_PREFIX}
|
|
|
|
${qucs-suite_BINARY_DIR}" )
|
|
|
|
|
2022-05-31 19:23:50 +03:00
|
|
|
FIND_PACKAGE( Qt5 COMPONENTS Core Gui Widgets LinguistTools REQUIRED )
|
2013-06-02 20:00:43 +02:00
|
|
|
|
|
|
|
ADD_DEFINITIONS(${QT_DEFINITIONS})
|
|
|
|
|
2022-02-19 12:04:51 +01:00
|
|
|
IF (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
|
|
ADD_DEFINITIONS(-DQT_NO_DEBUG_OUTPUT)
|
|
|
|
ENDIF()
|
2016-06-24 17:11:00 +03:00
|
|
|
|
2013-06-02 20:00:43 +02:00
|
|
|
ADD_SUBDIRECTORY( qucs )
|
2014-07-15 22:10:57 +02:00
|
|
|
ADD_SUBDIRECTORY( qucs-activefilter )
|
2013-06-02 20:00:43 +02:00
|
|
|
#ADD_SUBDIRECTORY( qucs-doc )
|
|
|
|
ADD_SUBDIRECTORY( qucs-filter )
|
|
|
|
ADD_SUBDIRECTORY( qucs-lib )
|
|
|
|
#ADD_SUBDIRECTORY( examples )
|
2014-11-11 19:34:00 +01:00
|
|
|
ADD_SUBDIRECTORY( translations )
|
2016-06-24 17:11:00 +03:00
|
|
|
|
2016-11-30 11:24:50 +03:00
|
|
|
INSTALL(DIRECTORY "examples" DESTINATION "share/${QUCS_NAME}")
|
2013-11-21 14:54:55 +01:00
|
|
|
|
2013-12-04 20:51:05 +01:00
|
|
|
#
|
|
|
|
# Custom uninstall target
|
|
|
|
#
|
|
|
|
configure_file(
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/uninstall.cmake.in"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/uninstall.cmake"
|
|
|
|
IMMEDIATE @ONLY)
|
|
|
|
|
|
|
|
add_custom_target(uninstall
|
|
|
|
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/uninstall.cmake)
|
|
|
|
|
|
|
|
|