forked from shadowsocks/shadowsocks-qt5
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from shadowsocks/master
Move to use CMake build system shadowsocks#521
- Loading branch information
Showing
10 changed files
with
119 additions
and
132 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
*.pro.user* | ||
*.user* | ||
*.swp | ||
.directory | ||
build/ |
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,50 @@ | ||
cmake_minimum_required(VERSION 3.1) | ||
|
||
project(Shadowsocks-Qt5 | ||
VERSION 2.10.0 | ||
LANGUAGES CXX) | ||
|
||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTOUIC ON) | ||
set(CMAKE_AUTORCC ON) | ||
set(CMAKE_CXX_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | ||
|
||
find_package(Qt5Core) | ||
find_package(Qt5Gui) | ||
find_package(Qt5Widgets) | ||
find_package(Qt5Network) | ||
if(UNIX AND NOT APPLE) | ||
find_package(Qt5DBus) | ||
endif() | ||
find_package(PkgConfig) | ||
|
||
pkg_check_modules(QSS REQUIRED QtShadowsocks>=1.10.0) | ||
find_library(QSS_LIBRARY_VAR | ||
NAMES ${QSS_LIBRARIES} | ||
HINTS ${QSS_LIBRARY_DIRS} ${QSS_LIBDIR}) | ||
|
||
pkg_check_modules(QRENCODE REQUIRED libqrencode) | ||
find_library(QRENCODE_LIBRARY_VAR | ||
NAMES ${QRENCODE_LIBRARIES} | ||
HINTS ${QRENCODE_LIBRARY_DIRS} ${QRENCODE_LIBDIR}) | ||
|
||
pkg_check_modules(ZBAR REQUIRED zbar) | ||
find_library(ZBAR_LIBRARY_VAR | ||
NAMES ${ZBAR_LIBRARIES} | ||
HINTS ${ZBAR_LIBRARY_DIRS} ${ZBAR_LIBDIR}) | ||
|
||
if(UNIX AND NOT APPLE) | ||
pkg_check_modules(APPINDICATOR REQUIRED appindicator-0.1) | ||
find_library(APPINDICATOR_LIBRARY_VAR | ||
NAMES ${APPINDICATOR_LIBRARIES} | ||
HINTS ${APPINDICATOR_LIBRARY_DIRS} ${APPINDICATOR_LIBDIR}) | ||
endif() | ||
|
||
if(WIN32 OR APPLE) | ||
add_definitions(-DFD_SETSIZE=1024) | ||
endif() | ||
|
||
add_subdirectory(src) |
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ Priority: extra | |
Maintainer: Symeon Huang <[email protected]> | ||
Build-Depends: debhelper (>= 9), | ||
pkg-config, | ||
qt5-qmake, | ||
cmake (>= 3.1.0) | cmake3 (>= 3.1.0), | ||
qtbase5-dev, | ||
libqrencode-dev, | ||
libqtshadowsocks-dev (>= 1.10.0), | ||
|
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 |
---|---|---|
@@ -1,13 +1,6 @@ | ||
#!/usr/bin/make -f | ||
|
||
export QT_SELECT := qt5 | ||
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed | ||
|
||
%: | ||
dh $@ --parallel | ||
|
||
override_dh_auto_configure: | ||
qmake | ||
|
||
override_dh_auto_install-indep: | ||
make INSTALL_ROOT=$(CURDIR)/debian/tmp | ||
dh $@ --buildsystem=cmake --parallel |
This file was deleted.
Oops, something went wrong.
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,60 @@ | ||
set(APP_NAME "ss-qt5") | ||
add_definitions(-DAPP_VERSION="${PROJECT_VERSION}") | ||
|
||
set(SOURCE | ||
icons.qrc | ||
translations.qrc | ||
main.cpp | ||
mainwindow.cpp | ||
ip4validator.cpp | ||
portvalidator.cpp | ||
ssvalidator.cpp | ||
qrwidget.cpp | ||
sharedialog.cpp | ||
editdialog.cpp | ||
logdialog.cpp | ||
connection.cpp | ||
confighelper.cpp | ||
urihelper.cpp | ||
uriinputdialog.cpp | ||
sqprofile.cpp | ||
settingsdialog.cpp | ||
statusnotifier.cpp | ||
connectiontablemodel.cpp | ||
connectionitem.cpp | ||
qrcodecapturer.cpp | ||
) | ||
|
||
if (WIN32) | ||
list(APPEND SOURCE ss-qt5.rc) | ||
endif() | ||
|
||
add_executable(${APP_NAME} ${SOURCE}) | ||
|
||
target_link_libraries(${APP_NAME} | ||
PUBLIC Qt5::Core | ||
PUBLIC Qt5::Gui | ||
PUBLIC Qt5::Widgets | ||
PUBLIC Qt5::Network | ||
PRIVATE ${QSS_LIBRARY_VAR} | ||
PRIVATE ${QRENCODE_LIBRARY_VAR} | ||
PRIVATE ${ZBAR_LIBRARY_VAR}) | ||
target_include_directories(${APP_NAME} | ||
PRIVATE ${QSS_INCLUDE_DIRS} | ||
PRIVATE ${QRENCODE_INCLUDE_DIRS} | ||
PRIVATE ${ZBAR_INCLUDE_DIRS}) | ||
|
||
if (UNIX AND NOT APPLE) | ||
target_link_libraries(${APP_NAME} | ||
PRIVATE Qt5::DBus | ||
PRIVATE ${APPINDICATOR_LIBRARY_VAR}) | ||
target_include_directories(${APP_NAME} PRIVATE ${APPINDICATOR_INCLUDE_DIRS}) | ||
endif() | ||
|
||
install(TARGETS ${APP_NAME} | ||
RUNTIME DESTINATION bin) | ||
|
||
if (UNIX) | ||
install(FILES shadowsocks-qt5.desktop DESTINATION share/applications) | ||
install(FILES icons/shadowsocks-qt5.png DESTINATION share/icons/hicolor/512x512/apps) | ||
endif() |
File renamed without changes.
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 was deleted.
Oops, something went wrong.