qucs_s/CMakeLists.txt

63 lines
1.7 KiB
CMake
Raw Normal View History

PROJECT(qucs-suite CXX)
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
cmake_policy(VERSION 3.0)
SET(QUCS_NAME "qucs-s")
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()
message(STATUS "${PROJECT_NAME} ${CMAKE_INSTALL_PREFIX}
${qucs-suite_BINARY_DIR}" )
2023-01-25 11:07:42 +03:00
IF(WITH_QT6)
2023-01-17 00:37:23 +03:00
FIND_PACKAGE( Qt6 COMPONENTS Core Gui Widgets LinguistTools REQUIRED )
2023-01-25 11:07:42 +03:00
ELSE()
FIND_PACKAGE( Qt5 COMPONENTS Core Gui Widgets LinguistTools REQUIRED )
ENDIF()
ADD_DEFINITIONS(${QT_DEFINITIONS})
IF (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
ADD_DEFINITIONS(-DQT_NO_DEBUG_OUTPUT)
ENDIF()
ADD_SUBDIRECTORY( qucs )
ADD_SUBDIRECTORY( qucs-activefilter )
2022-08-25 15:36:02 +03:00
ADD_SUBDIRECTORY( qucs-attenuator )
#ADD_SUBDIRECTORY( qucs-doc )
ADD_SUBDIRECTORY( qucs-filter )
2022-09-24 17:54:41 +03:00
ADD_SUBDIRECTORY( library )
ADD_SUBDIRECTORY( qucs-transcalc )
ADD_SUBDIRECTORY( qucs-powercombining )
#ADD_SUBDIRECTORY( examples )
ADD_SUBDIRECTORY( translations )
INSTALL(DIRECTORY "examples" DESTINATION "share/${QUCS_NAME}")
#
# 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)