diff --git a/CMakeLists.txt b/CMakeLists.txt index 46b509ab..da5cd023 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,12 @@ PROJECT(qucs-suite CXX) CMAKE_MINIMUM_REQUIRED(VERSION 2.8) cmake_policy(VERSION 2.8) +IF(WITH_SPICE) +MESSAGE("SPICE support enabled") +SET(QUCS_NAME "qucs-s") +ELSE() +SET(QUCS_NAME "qucs") +ENDIF() file (STRINGS "${qucs-suite_SOURCE_DIR}/VERSION" QUCS_VERSION) message(STATUS "Configuring Qucs: VERSION ${QUCS_VERSION}") @@ -38,19 +44,24 @@ INCLUDE( ${QT_USE_FILE} ) ADD_DEFINITIONS(${QT_DEFINITIONS}) + +IF(NOT WITH_SPICE) +ADD_SUBDIRECTORY( qucs-attenuator ) +ADD_SUBDIRECTORY( qucs-edit ) +ADD_SUBDIRECTORY( qucs-transcalc ) +ADD_SUBDIRECTORY( qucs-rescodes ) +ADD_SUBDIRECTORY( contrib ) +ENDIF() + ADD_SUBDIRECTORY( qucs ) ADD_SUBDIRECTORY( qucs-activefilter ) -ADD_SUBDIRECTORY( qucs-attenuator ) #ADD_SUBDIRECTORY( qucs-doc ) -ADD_SUBDIRECTORY( qucs-edit ) ADD_SUBDIRECTORY( qucs-filter ) ADD_SUBDIRECTORY( qucs-help ) ADD_SUBDIRECTORY( qucs-lib ) -ADD_SUBDIRECTORY( qucs-transcalc ) -ADD_SUBDIRECTORY( qucs-rescodes ) #ADD_SUBDIRECTORY( examples ) ADD_SUBDIRECTORY( translations ) -ADD_SUBDIRECTORY( contrib ) + # diff --git a/config.h.cmake b/config.h.cmake index cab35aeb..3513b7df 100755 --- a/config.h.cmake +++ b/config.h.cmake @@ -1,7 +1,10 @@ +#define QUCS_NAME "@QUCS_NAME@" + #define PACKAGE_VERSION "@PROJECT_VERSION@" #define PACKAGE_STRING "qucs @PROJECT_VERSION@" #define HAVE_QTABWIDGET_SETMOVABLE "@HAVE_QTABWIDGET_SETMOVABLE@" +#define WITH_SPICE "@WITH_SPICE@" #define GIT "@GIT@" diff --git a/qucs-activefilter/CMakeLists.txt b/qucs-activefilter/CMakeLists.txt index 12a06494..8d89ec8d 100644 --- a/qucs-activefilter/CMakeLists.txt +++ b/qucs-activefilter/CMakeLists.txt @@ -2,6 +2,13 @@ PROJECT(qucsactivefilter CXX C) CMAKE_MINIMUM_REQUIRED(VERSION 2.6) cmake_policy(VERSION 2.6) +IF(WITH_SPICE) +MESSAGE("SPICE support enabled") +SET(QUCS_NAME "qucs-s") +ELSE() +SET(QUCS_NAME "qucs") +ENDIF() + # use top VERSION file file (STRINGS ${PROJECT_SOURCE_DIR}/../VERSION QUCS_VERSION) message(STATUS "Configuring ${PROJECT_NAME} (GUI): VERSION ${QUCS_VERSION}") @@ -13,7 +20,7 @@ set(PROJECT_COPYRIGHT_YEAR "2014") set(PROJECT_DOMAIN_FIRST "qucs") set(PROJECT_DOMAIN_SECOND "org") -SET(CMAKE_BUILD_TYPE Debug) +#SET(CMAKE_BUILD_TYPE Debug) ADD_DEFINITIONS( -DHAVE_CONFIG_H ) @@ -83,14 +90,14 @@ IF(APPLE) ENDIF(APPLE) -ADD_EXECUTABLE(qucsactivefilter MACOSX_BUNDLE WIN32 +ADD_EXECUTABLE(${QUCS_NAME}activefilter MACOSX_BUNDLE WIN32 ${QUCS-ACTIVE-FILTER_SRCS} ${QUCS-ACTIVE-FILTER_MOC_SRCS} ${RESOURCES_SRCS} ) -TARGET_LINK_LIBRARIES(qucsactivefilter ${QT_LIBRARIES}) +TARGET_LINK_LIBRARIES(${QUCS_NAME}activefilter ${QT_LIBRARIES}) -INSTALL(TARGETS qucsactivefilter +INSTALL(TARGETS ${QUCS_NAME}activefilter BUNDLE DESTINATION bin COMPONENT Runtime RUNTIME DESTINATION bin COMPONENT Runtime ) diff --git a/qucs-filter/CMakeLists.txt b/qucs-filter/CMakeLists.txt index c725fcc5..e128d537 100644 --- a/qucs-filter/CMakeLists.txt +++ b/qucs-filter/CMakeLists.txt @@ -2,6 +2,13 @@ PROJECT(qucsfilter CXX C) CMAKE_MINIMUM_REQUIRED(VERSION 2.6) cmake_policy(VERSION 2.6) +IF(WITH_SPICE) +MESSAGE("SPICE support enabled") +SET(QUCS_NAME "qucs-s") +ELSE() +SET(QUCS_NAME "qucs") +ENDIF() + # use top VERSION file file (STRINGS ${PROJECT_SOURCE_DIR}/../VERSION QUCS_VERSION) message(STATUS "Configuring ${PROJECT_NAME} (GUI): VERSION ${QUCS_VERSION}") @@ -13,10 +20,11 @@ set(PROJECT_COPYRIGHT_YEAR "2014") set(PROJECT_DOMAIN_FIRST "qucs") set(PROJECT_DOMAIN_SECOND "org") -SET(CMAKE_BUILD_TYPE Debug) +#SET(CMAKE_BUILD_TYPE Debug) ADD_DEFINITIONS( -DHAVE_CONFIG_H ) + # configure the header config.h CONFIGURE_FILE ( "${PROJECT_SOURCE_DIR}/../config.h.cmake" @@ -102,15 +110,15 @@ IF(APPLE) ENDIF(APPLE) -ADD_EXECUTABLE(qucsfilter MACOSX_BUNDLE WIN32 +ADD_EXECUTABLE(${QUCS_NAME}filter MACOSX_BUNDLE WIN32 ${QUCS-FILTER_SRCS} ${QUCS-FILTER_HDRS} ${QUCS-FILTER_MOC_SRCS} ${RESOURCES_SRCS} ) -TARGET_LINK_LIBRARIES(qucsfilter ${QT_LIBRARIES}) +TARGET_LINK_LIBRARIES(${QUCS_NAME}filter ${QT_LIBRARIES}) -INSTALL(TARGETS qucsfilter +INSTALL(TARGETS ${QUCS_NAME}filter BUNDLE DESTINATION bin COMPONENT Runtime RUNTIME DESTINATION bin COMPONENT Runtime ) diff --git a/qucs-help/CMakeLists.txt b/qucs-help/CMakeLists.txt index 92fc5292..a93ef8d9 100644 --- a/qucs-help/CMakeLists.txt +++ b/qucs-help/CMakeLists.txt @@ -2,6 +2,15 @@ PROJECT(qucshelp CXX C) CMAKE_MINIMUM_REQUIRED(VERSION 2.6) cmake_policy(VERSION 2.6) +IF(WITH_SPICE) +MESSAGE("SPICE support enabled") +SET(QUCS_NAME "qucs-s") +ELSE() +SET(QUCS_NAME "qucs") +ENDIF() + +IF(NOT WITH_SPICE) + # use top VERSION file file (STRINGS ${PROJECT_SOURCE_DIR}/../VERSION QUCS_VERSION) message(STATUS "Configuring ${PROJECT_NAME} (GUI): VERSION ${QUCS_VERSION}") @@ -93,3 +102,9 @@ INSTALL( FILES ./docs/qucsdigi.1 DESTINATION share/man/man1 ) INSTALL( FILES ./docs/qucsdigilib.1 DESTINATION share/man/man1 ) INSTALL( FILES ./docs/qucsveri.1 DESTINATION share/man/man1 ) +ELSE() + +ADD_SUBDIRECTORY( docs ) +INSTALL( FILES ./docs/${QUCS_NAME}.1 DESTINATION share/man/man1 ) + +ENDIF() diff --git a/qucs-help/docs/cs/CMakeLists.txt b/qucs-help/docs/cs/CMakeLists.txt index b29c7d95..8529d5b0 100644 --- a/qucs-help/docs/cs/CMakeLists.txt +++ b/qucs-help/docs/cs/CMakeLists.txt @@ -8,5 +8,5 @@ optimization1.png optimization4.png optimization7.png qucsdigi.png subcircuit.p optimization2.png optimization5.png optimization8.png qucsmain.png wire.png ) # installation of documentation -INSTALL(FILES ${HTML} ${PNGS} DESTINATION share/qucs/docs/cs) +INSTALL(FILES ${HTML} ${PNGS} DESTINATION share/${QUCS_NAME}/docs/cs) diff --git a/qucs-help/docs/de/CMakeLists.txt b/qucs-help/docs/de/CMakeLists.txt index 36f198bc..a4b9a86a 100644 --- a/qucs-help/docs/de/CMakeLists.txt +++ b/qucs-help/docs/de/CMakeLists.txt @@ -9,5 +9,5 @@ optimization2.png optimization5.png optimization8.png qucshaupt.png wire.png index.html matching.html programs.html start.html start_opt.html) # installation of documentation -INSTALL(FILES ${HTML} ${PNGS} DESTINATION share/qucs/docs/de) +INSTALL(FILES ${HTML} ${PNGS} DESTINATION share/${QUCS_NAME}/docs/de) diff --git a/qucs-help/docs/en/CMakeLists.txt b/qucs-help/docs/en/CMakeLists.txt index 2f83977c..deaf2912 100644 --- a/qucs-help/docs/en/CMakeLists.txt +++ b/qucs-help/docs/en/CMakeLists.txt @@ -11,5 +11,5 @@ SET(PNGS qucsmain.png paste.png wire.png select.png contab.png subcircuit.png # installation of documentation -INSTALL(FILES ${HTML} ${PNGS} DESTINATION share/qucs/docs/en) +INSTALL(FILES ${HTML} ${PNGS} DESTINATION share/${QUCS_NAME}/docs/en) diff --git a/qucs-help/docs/es/CMakeLists.txt b/qucs-help/docs/es/CMakeLists.txt index a0440536..a91555e3 100644 --- a/qucs-help/docs/es/CMakeLists.txt +++ b/qucs-help/docs/es/CMakeLists.txt @@ -5,5 +5,5 @@ SET(HTML index.html mathfunc.html programs.html short.html start.html subcircuit SET(PNGS contab.png paste.png qucsmain.png select.png subcircuit.png wire.png ) # installation of documentation -INSTALL(FILES ${HTML} ${PNGS} DESTINATION share/qucs/docs/es) +INSTALL(FILES ${HTML} ${PNGS} DESTINATION share/${QUCS_NAME}/docs/es) diff --git a/qucs-help/docs/fr/CMakeLists.txt b/qucs-help/docs/fr/CMakeLists.txt index d2cc9892..baa9c605 100644 --- a/qucs-help/docs/fr/CMakeLists.txt +++ b/qucs-help/docs/fr/CMakeLists.txt @@ -5,5 +5,5 @@ SET(HTML index.html mathfunc.html short.html start.html subcircuit.html) SET(PNGS contab.png paste.png qucsmain.png select.png subcircuit.png wire.png) # installation of documentation -INSTALL(FILES ${HTML} ${PNGS} DESTINATION share/qucs/docs/fr) +INSTALL(FILES ${HTML} ${PNGS} DESTINATION share/${QUCS_NAME}/docs/fr) diff --git a/qucs-help/docs/pt/CMakeLists.txt b/qucs-help/docs/pt/CMakeLists.txt index 15cea57e..4963ef63 100644 --- a/qucs-help/docs/pt/CMakeLists.txt +++ b/qucs-help/docs/pt/CMakeLists.txt @@ -8,5 +8,5 @@ optimization1.png optimization4.png optimization7.png qucsdigi.png subcircuit.p optimization2.png optimization5.png optimization8.png qucsmain.png wire.png) # installation of documentation -INSTALL(FILES ${HTML} ${PNGS} DESTINATION share/qucs/docs/pt) +INSTALL(FILES ${HTML} ${PNGS} DESTINATION share/${QUCS_NAME}/docs/pt) diff --git a/qucs-help/docs/ru/CMakeLists.txt b/qucs-help/docs/ru/CMakeLists.txt index 24b49789..ff29e11a 100644 --- a/qucs-help/docs/ru/CMakeLists.txt +++ b/qucs-help/docs/ru/CMakeLists.txt @@ -8,5 +8,5 @@ optimization1.png optimization4.png optimization7.png qucsdigi.png subcircuit.p optimization2.png optimization5.png optimization8.png qucsmain.png wire.png) # installation of documentation -INSTALL(FILES ${HTML} ${PNGS} DESTINATION share/qucs/docs/ru) +INSTALL(FILES ${HTML} ${PNGS} DESTINATION share/${QUCS_NAME}/docs/ru) diff --git a/qucs-help/docs/uk/CMakeLists.txt b/qucs-help/docs/uk/CMakeLists.txt index 06a5c64c..64b37869 100644 --- a/qucs-help/docs/uk/CMakeLists.txt +++ b/qucs-help/docs/uk/CMakeLists.txt @@ -8,5 +8,5 @@ optimization1.png optimization4.png optimization7.png qucsdigi.png subcircuit.p optimization2.png optimization5.png optimization8.png qucsmain.png wire.png) # installation of documentation -INSTALL(FILES ${HTML} ${PNGS} DESTINATION share/qucs/docs/uk) +INSTALL(FILES ${HTML} ${PNGS} DESTINATION share/${QUCS_NAME}/docs/uk) diff --git a/qucs-lib/CMakeLists.txt b/qucs-lib/CMakeLists.txt index 98101feb..c7ccd2a0 100644 --- a/qucs-lib/CMakeLists.txt +++ b/qucs-lib/CMakeLists.txt @@ -2,6 +2,13 @@ PROJECT(qucslib CXX C) CMAKE_MINIMUM_REQUIRED(VERSION 2.6) cmake_policy(VERSION 2.6) +IF(WITH_SPICE) +MESSAGE("SPICE support enabled") +SET(QUCS_NAME "qucs-s") +ELSE() +SET(QUCS_NAME "qucs") +ENDIF() + # use top VERSION file file (STRINGS ${PROJECT_SOURCE_DIR}/../VERSION QUCS_VERSION) message(STATUS "Configuring ${PROJECT_NAME} (GUI): VERSION ${QUCS_VERSION}") @@ -13,7 +20,7 @@ set(PROJECT_COPYRIGHT_YEAR "2014") set(PROJECT_DOMAIN_FIRST "qucs") set(PROJECT_DOMAIN_SECOND "org") -SET(CMAKE_BUILD_TYPE Debug) +#SET(CMAKE_BUILD_TYPE Debug) ADD_DEFINITIONS( -DHAVE_CONFIG_H ) @@ -71,14 +78,14 @@ IF(APPLE) ENDIF(APPLE) -ADD_EXECUTABLE(qucslib MACOSX_BUNDLE WIN32 +ADD_EXECUTABLE(${QUCS_NAME}lib MACOSX_BUNDLE WIN32 ${QUCSLIB_SRCS} ${QUCSLIB_MOC_SRCS} ${RESOURCES_SRCS} ) -TARGET_LINK_LIBRARIES(qucslib ${QT_LIBRARIES}) +TARGET_LINK_LIBRARIES(${QUCS_NAME}lib ${QT_LIBRARIES}) -INSTALL(TARGETS qucslib +INSTALL(TARGETS ${QUCS_NAME}lib BUNDLE DESTINATION bin COMPONENT Runtime RUNTIME DESTINATION bin COMPONENT Runtime ) diff --git a/qucs-lib/library/AnalogueCM/CMakeLists.txt b/qucs-lib/library/AnalogueCM/CMakeLists.txt index 00f0705e..db28bcc6 100644 --- a/qucs-lib/library/AnalogueCM/CMakeLists.txt +++ b/qucs-lib/library/AnalogueCM/CMakeLists.txt @@ -4,5 +4,5 @@ etd.mod etd.ifs ) -INSTALL( FILES ${AN_CM_resources} DESTINATION share/qucs/library/AnalogueCM ) +INSTALL( FILES ${AN_CM_resources} DESTINATION share/${QUCS_NAME}/library/AnalogueCM ) diff --git a/qucs-lib/library/CMakeLists.txt b/qucs-lib/library/CMakeLists.txt index 0c3c4d72..02558c0d 100644 --- a/qucs-lib/library/CMakeLists.txt +++ b/qucs-lib/library/CMakeLists.txt @@ -26,6 +26,6 @@ ngspice.blacklist xyce.blacklist ) -INSTALL( FILES ${COMPLIBS} ${BLACKLIST} DESTINATION share/qucs/library ) +INSTALL( FILES ${COMPLIBS} ${BLACKLIST} DESTINATION share/${QUCS_NAME}/library ) ADD_SUBDIRECTORY( AnalogueCM ) diff --git a/qucs/CMakeLists.txt b/qucs/CMakeLists.txt index ca4c3fed..f4687851 100755 --- a/qucs/CMakeLists.txt +++ b/qucs/CMakeLists.txt @@ -13,6 +13,13 @@ PROJECT(qucs CXX) CMAKE_MINIMUM_REQUIRED(VERSION 2.6) cmake_policy(VERSION 2.6) +IF(WITH_SPICE) +MESSAGE("SPICE support enabled") +SET(QUCS_NAME "${PROJECT_NAME}-s") +ELSE() +SET(QUCS_NAME "${PROJECT_NAME}") +ENDIF() + # use top VERSION file file (STRINGS ${PROJECT_SOURCE_DIR}/../VERSION QUCS_VERSION) message(STATUS "Configuring ${PROJECT_NAME} (GUI): VERSION ${QUCS_VERSION}") @@ -25,7 +32,7 @@ set(PROJECT_DOMAIN_FIRST "qucs") set(PROJECT_DOMAIN_SECOND "org") # -SET(CMAKE_BUILD_TYPE Debug) +#SET(CMAKE_BUILD_TYPE Debug) # If Git hash not defined, try to define it IF(NOT GIT) @@ -237,7 +244,7 @@ ENDIF(APPLE) # # CMake's way of creating an executable # -ADD_EXECUTABLE( qucs MACOSX_BUNDLE WIN32 +ADD_EXECUTABLE( ${QUCS_NAME} MACOSX_BUNDLE WIN32 ${QUCS_HDRS} ${QUCS_SRCS} ${QUCS_MOC_SRCS} @@ -246,7 +253,7 @@ ADD_EXECUTABLE( qucs MACOSX_BUNDLE WIN32 # # Tell CMake which libraries we need to link our executable against. # -TARGET_LINK_LIBRARIES( qucs components diagrams dialogs paintings extsimkernels spicecomponents ${QT_LIBRARIES} ) +TARGET_LINK_LIBRARIES( ${QUCS_NAME} components diagrams dialogs paintings extsimkernels spicecomponents ${QT_LIBRARIES} ) # # Prepare the installation @@ -268,7 +275,7 @@ ENDIF(WIN32) # Install the Qucs application, on Apple, the bundle is # installed as on other platforms it'll go into the bin directory. # -INSTALL(TARGETS qucs +INSTALL(TARGETS ${QUCS_NAME} BUNDLE DESTINATION bin COMPONENT Runtime RUNTIME DESTINATION bin COMPONENT Runtime ) @@ -314,14 +321,15 @@ INSTALL(CODE " " COMPONENT Runtime) ENDIF() +IF(NOT WITH_SPICE) # Install wrapper scripts IF(WIN32) - SET(SCRIPTS qucsdigi.bat qucsveri.bat qucsdigilib.bat) +# SET(SCRIPTS qucsdigi.bat qucsveri.bat qucsdigilib.bat) ELSE() - SET(SCRIPTS qucsdigi qucsveri qucsdigilib) +# SET(SCRIPTS qucsdigi qucsveri qucsdigilib) ENDIF() INSTALL( FILES ${SCRIPTS} DESTINATION bin/ ) - +ENDIF() # To Create a package, one can run "cpack -G DragNDrop CPackConfig.cmake" on Mac OS X # where CPackConfig.cmake is created by including CPack diff --git a/qucs/extsimkernels/xspice/CMakeLists.txt b/qucs/extsimkernels/xspice/CMakeLists.txt index 3c8b1954..8bb1b933 100644 --- a/qucs/extsimkernels/xspice/CMakeLists.txt +++ b/qucs/extsimkernels/xspice/CMakeLists.txt @@ -5,5 +5,5 @@ cmlib.mingw32.rules.mk ) # installation of transmission lines -INSTALL( FILES ${RULES_MK} DESTINATION share/qucs/xspice_cmlib ) +INSTALL( FILES ${RULES_MK} DESTINATION share/${QUCS_NAME}/xspice_cmlib ) diff --git a/qucs/octave/CMakeLists.txt b/qucs/octave/CMakeLists.txt index 7773a7fa..60f929df 100644 --- a/qucs/octave/CMakeLists.txt +++ b/qucs/octave/CMakeLists.txt @@ -6,5 +6,5 @@ loadQucsDataSet.m plotCartesian2D2V.m plotTimeFFT.m loadQucsVariable.m plotFFT.m showQucsDataSet.m ) -INSTALL(FILES ${BASICS} DESTINATION share/qucs/octave/) +INSTALL(FILES ${BASICS} DESTINATION share/${QUCS_NAME}/octave/) diff --git a/qucs/python/CMakeLists.txt b/qucs/python/CMakeLists.txt index 739ec1a2..99c4682f 100644 --- a/qucs/python/CMakeLists.txt +++ b/qucs/python/CMakeLists.txt @@ -7,5 +7,5 @@ SET(BASICS rc_ac_sweep.net ) -INSTALL(FILES ${BASICS} DESTINATION share/qucs/python/) +INSTALL(FILES ${BASICS} DESTINATION share/${QUCS_NAME}/python/) diff --git a/qucs/spicecomponents/symbols/CMakeLists.txt b/qucs/spicecomponents/symbols/CMakeLists.txt index 1b4d6e2d..82a795dc 100644 --- a/qucs/spicecomponents/symbols/CMakeLists.txt +++ b/qucs/spicecomponents/symbols/CMakeLists.txt @@ -5,5 +5,5 @@ opamp3t.sym ) # installation of transmission lines -INSTALL( FILES ${SYMBOLS} DESTINATION share/qucs/symbols ) +INSTALL( FILES ${SYMBOLS} DESTINATION share/${QUCS_NAME}/symbols )