-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Power combining #346
Closed
Closed
Power combining #346
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
PROJECT(qucspowercombining CXX C) | ||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6) | ||
cmake_policy(VERSION 2.6) | ||
|
||
# use top VERSION file | ||
file (STRINGS ${PROJECT_SOURCE_DIR}/../VERSION QUCS_VERSION) | ||
message(STATUS "Configuring ${PROJECT_NAME} (GUI): VERSION ${QUCS_VERSION}") | ||
|
||
set(PROJECT_VERSION "${QUCS_VERSION}") | ||
|
||
set(PROJECT_VENDOR "Qucs team. This program is licensed under the GNU GPL") | ||
set(PROJECT_COPYRIGHT_YEAR "2014") | ||
set(PROJECT_DOMAIN_FIRST "qucs") | ||
set(PROJECT_DOMAIN_SECOND "org") | ||
|
||
SET(CMAKE_BUILD_TYPE Debug) | ||
|
||
ADD_DEFINITIONS( -DHAVE_CONFIG_H ) | ||
|
||
# define variables | ||
SET(BINARYDIR "${CMAKE_INSTALL_PREFIX}/bin/") | ||
#SET(BITMAPDIR "${CMAKE_INSTALL_PREFIX}/share/qucs/bitmaps/") | ||
SET(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/qucs/docs/") | ||
SET(LANGUAGEDIR "${CMAKE_INSTALL_PREFIX}/share/qucs/lang/") | ||
SET(LIBRARYDIR "${CMAKE_INSTALL_PREFIX}/share/qucs/library/") | ||
SET(OCTAVEDIR "${CMAKE_INSTALL_PREFIX}/share/qucs/octave/") | ||
|
||
# configure the header config.h | ||
CONFIGURE_FILE ( | ||
"${PROJECT_SOURCE_DIR}/../config.h.cmake" | ||
"${PROJECT_BINARY_DIR}/config.h" | ||
) | ||
|
||
INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}") | ||
|
||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall ") # enable warning level | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x ") # enable C++11 | ||
|
||
# flag not available in mingw 4.8.2, MSVC10 | ||
IF(NOT WIN32) | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-register ") | ||
ENDIF() | ||
|
||
FIND_PACKAGE( Qt4 REQUIRED ) | ||
SET( QT_USE_QTGUI TRUE ) | ||
|
||
INCLUDE( ${QT_USE_FILE} ) | ||
|
||
ADD_DEFINITIONS(${QT_DEFINITIONS}) | ||
|
||
#ADD_SUBDIRECTORY( bitmaps ) -> added as resources | ||
|
||
SET( powercombining_sources main.cpp qucspowercombiningtool.cpp ) | ||
|
||
SET( powercombining_moc_headers qucspowercombiningtool.h ) | ||
|
||
QT4_WRAP_CPP( powercombining_moc_sources ${powercombining_moc_headers} ) | ||
|
||
#SET(RESOURCES qucspowercombining.qrc) | ||
|
||
QT4_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES}) | ||
|
||
IF(APPLE) | ||
# set information on Info.plist file | ||
SET(MACOSX_BUNDLE_INFO_STRING "${PROJECT_NAME} ${PROJECT_VERSION}") | ||
SET(MACOSX_BUNDLE_BUNDLE_VERSION "${PROJECT_NAME} ${PROJECT_VERSION}") | ||
SET(MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_NAME} ${PROJECT_VERSION}") | ||
SET(MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}") | ||
SET(MACOSX_BUNDLE_COPYRIGHT "${PROJECT_COPYRIGHT_YEAR} ${PROJECT_VENDOR}") | ||
SET(MACOSX_BUNDLE_GUI_IDENTIFIER "${PROJECT_DOMAIN_SECOND}.${PROJECT_DOMAIN_FIRST}") | ||
SET(MACOSX_BUNDLE_BUNDLE_NAME "${PROJECT_NAME}") | ||
SET(MACOSX_BUNDLE_ICON_FILE qucsattenuator.icns) | ||
|
||
# set where in the bundle to put the icns file | ||
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/../qucs/bitmaps/qucspowercombining.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) | ||
# include the icns file in the target | ||
SET(powercombining_sources ${powercombining_sources} ${CMAKE_CURRENT_SOURCE_DIR}/../qucs/bitmaps/qucsattenuator.icns) | ||
|
||
ENDIF(APPLE) | ||
|
||
ADD_EXECUTABLE( qucspowercombining MACOSX_BUNDLE WIN32 | ||
${powercombining_sources} | ||
${powercombining_moc_sources} | ||
${RESOURCES_SRCS} ) | ||
|
||
TARGET_LINK_LIBRARIES( qucspowercombining ${QT_LIBRARIES} ) | ||
|
||
INSTALL (TARGETS qucspowercombining DESTINATION bin) | ||
# | ||
# Prepare the installation | ||
# | ||
SET(plugin_dest_dir bin) | ||
SET(qtconf_dest_dir bin) | ||
SET(APPS "${CMAKE_INSTALL_PREFIX}/bin/${PROJECT_NAME}") | ||
IF(APPLE) | ||
SET(plugin_dest_dir ${PROJECT_NAME}.app/Contents/MacOS) | ||
SET(qtconf_dest_dir ${PROJECT_NAME}.app/Contents/Resources) | ||
SET(APPS "${CMAKE_INSTALL_PREFIX}/bin/${PROJECT_NAME}.app") | ||
ENDIF(APPLE) | ||
|
||
IF(WIN32) | ||
SET(APPS "${CMAKE_INSTALL_PREFIX}/bin/${PROJECT_NAME}.exe") | ||
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 ${PROJECT_NAME} | ||
BUNDLE DESTINATION bin COMPONENT Runtime | ||
RUNTIME DESTINATION bin COMPONENT Runtime | ||
) | ||
|
||
# man pages | ||
#INSTALL( FILES qucspowercombining.1 DESTINATION share/man/man1 ) | ||
|
||
|
||
# | ||
# Install needed Qt plugins by copying directories from the qt installation | ||
# One can cull what gets copied by using 'REGEX "..." EXCLUDE' | ||
# | ||
IF(APPLE) | ||
INSTALL(DIRECTORY "${QT_PLUGINS_DIR}/imageformats" DESTINATION bin/${plugin_dest_dir}/plugins COMPONENT Runtime) | ||
ENDIF() | ||
# | ||
# install a qt.conf file | ||
# this inserts some cmake code into the install script to write the file | ||
# | ||
IF(APPLE) | ||
INSTALL(CODE " | ||
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/bin/${qtconf_dest_dir}/qt.conf\" \"\") | ||
" COMPONENT Runtime) | ||
ENDIF() | ||
|
||
#-------------------------------------------------------------------------------- | ||
# Use BundleUtilities to get all other dependencies for the application to work. | ||
# It takes a bundle or executable along with possible plugins and inspects it | ||
# for dependencies. If they are not system dependencies, they are copied. | ||
|
||
# directories to look for dependencies | ||
IF(APPLE) | ||
SET(DIRS ${QT_LIBRARY_DIRS}) | ||
ENDIF() | ||
|
||
# Now the work of copying dependencies into the bundle/package | ||
# The quotes are escaped and variables to use at install time have their $ escaped | ||
# An alternative is the do a configure_file() on a script and use install(SCRIPT ...). | ||
# Note that the image plugins depend on QtSvg and QtXml, and it got those copied | ||
# over. | ||
IF(APPLE) | ||
INSTALL(CODE " | ||
file(GLOB_RECURSE QTPLUGINS | ||
\"\${CMAKE_INSTALL_PREFIX}/bin/${plugin_dest_dir}/plugins/*${CMAKE_SHARED_LIBRARY_SUFFIX}\") | ||
include(BundleUtilities) | ||
fixup_bundle(\"${APPS}\" \"\${QTPLUGINS}\" \"${DIRS}\") | ||
" COMPONENT Runtime) | ||
ENDIF() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
## Process this file with automake to produce Makefile.in | ||
# | ||
# qucs-powercombining/Makefile.am | ||
# | ||
# Automake input file. | ||
# | ||
# Copyright (C) 2006 Stefan Jahn <stefan@lkcc.org> | ||
# | ||
# This is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2, or (at your option) | ||
# any later version. | ||
# | ||
# This software is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this package; see the file COPYING. If not, write to | ||
# the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, | ||
# Boston, MA 02110-1301, USA. | ||
# | ||
|
||
bin_PROGRAMS = qucspowercombining | ||
|
||
MOCHEADERS = qucspowercombiningtool.h | ||
MOCFILES = $(MOCHEADERS:.h=.moc.cpp) | ||
|
||
qucspowercombining_SOURCES = main.cpp qucspowercombiningtool.cpp | ||
|
||
|
||
nodist_qucspowercombining_SOURCES = $(MOCFILES) | ||
|
||
AM_CPPFLAGS = $(X11_INCLUDES) $(QT_INCLUDES) | ||
qucspowercombining_LDFLAGS = $(X11_LDFLAGS) $(QT_LDFLAGS) | ||
qucspowercombining_LDADD = $(X11_LIBS) $(QT_LIBS) | ||
|
||
SUFFIXES = .moc.cpp | ||
|
||
.h.moc.cpp: | ||
$(MOC) -o $@ $< | ||
|
||
CLEANFILES = *~ | ||
MAINTAINERCLEANFILES = Makefile.in *.moc.cpp | ||
DISTCLEANFILES = *.moc.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* main.cpp - Power combining tool main | ||
* | ||
* copyright (C) 2015 Andres Martinez-Mera <andresmartinezmera@gmail.com> | ||
* | ||
* This is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2, or (at your option) | ||
* any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this package; see the file COPYING. If not, write to | ||
* the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, | ||
* Boston, MA 02110-1301, USA. | ||
* | ||
* | ||
*/ | ||
#include "qucspowercombiningtool.h" | ||
#include <QApplication> | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
QApplication app(argc, argv); | ||
QucsPowerCombiningTool *PowerCombiningTool = new QucsPowerCombiningTool(); | ||
PowerCombiningTool->raise(); | ||
PowerCombiningTool->resize(350, 350); | ||
PowerCombiningTool->show(); | ||
return app.exec(); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add your name here