Skip to content

Commit 3a49de6

Browse files
build
1 parent ae8d072 commit 3a49de6

File tree

9 files changed

+57
-19
lines changed

9 files changed

+57
-19
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/key_data/*
1515
/keychain_cmd_app/.idea/*
1616
/keychain_lib/CMakeFiles/*
17-
/passentry_gui/cmake-build-debug/*
17+
/keychain_linux/passentry_gui/cmake-build-debug/*
1818
/passentry_gui/.idea/*
1919
/ws/cmake-build-debug/*
2020
/ws/.idea/*

keychain_linux/passentry_gui/CMakeLists.txt

Lines changed: 48 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,72 @@ set(CMAKE_CXX_STANDARD 14)
33
#set(CMAKE_CXX_FLAGS "-std=c++14 --verbose -fno-limit-debug-info")
44
set(CMAKE_CXX_FLAGS "-std=c++14 ")
55

6+
project(testproject)
7+
8+
69
if (NOT MSVC)
710
if ( LIBCXX_BUILD )
811
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++" )
912
endif()
1013
endif()
1114

12-
set (CMAKE_PREFIX_PATH "${QT_ROOT}/gcc_64/lib/cmake/Qt5Widgets/")
15+
#set (CMAKE_PREFIX_PATH "${QT_ROOT}/gcc_64/lib/cmake/Qt5Widgets/")
16+
set (CMAKE_PREFIX_PATH "/home/user/Qt5.12.0/5.12.0/gcc_64/lib/cmake/Qt5Widgets")
1317

1418
project(passentrygui)
1519
# Find includes in corresponding build directories
1620

1721
set(CMAKE_INCLUDE_CURRENT_DIR ON)
18-
# Instruct CMake to run moc automatically when needed
22+
23+
#set(CMAKE_AUTOUIC_SEARCH_PATHS "${CMAKE_SOURCE_DIR}/keychain_linux/passentry_gui/src")
24+
#set(AUTOGEN_BUILD_DIR "${CMAKE_SOURCE_DIR}/keychain_linux/passentry_gui/GeneratedFiles")
25+
1926
set(CMAKE_AUTOMOC ON)
20-
# Create code from a list of Qt designer ui files
21-
#set(CMAKE_AUTOUIC ON)
27+
set(CMAKE_AUTOUIC ON)
28+
#set(CMAKE_AUTORCC ON)
29+
30+
SET(Qt5_DIR /home/user/Qt5.12.0/5.12.0/gcc_64/lib/cmake/Qt5)
31+
SET(Qt5Core_DIR /home/user/Qt5.12.0/5.12.0/gcc_64/lib/cmake/Qt5Core)
32+
33+
find_package(Qt5Widgets CONFIG REQUIRED)
34+
find_package(Qt5Core)
35+
#find_package(Qt5 5.12.0 REQUIRED Gui Xml)
2236

37+
#find_package(Qt5Qml )
38+
#find_package(Qt5Svg)
39+
40+
#get_target_property(QtCore_location Qt5::Core LOCATION)
41+
42+
#add_definitions(-DUNICODE -D_UNICODE)
43+
44+
#qt5_add_resources(RESOURCES "${CMAKE_SOURCE_DIR}/keychain_linux/passentry_gui/Resources/*.qrc")
45+
#QT5_WRAP_UI(MOC_FILES "${CMAKE_SOURCE_DIR}/keychain_linux/passentry_gui/src/*.ui")
46+
#include_directories(${Qt5Widgets_INCLUDES})
47+
#include_directories(${Qt5Core_INCLUDES})
48+
#include_directories(${Qt5Qml_INCLUDES})
49+
#include_directories(${Qt5Svg_INCLUDES})
50+
#add_definitions(${Qt5Widgets_DEFINITIONS})
2351

2452
find_library(LIB_PTHREAD NAME pthread HINTS "/usr/lib/x86_64-linux-gnu")
2553

2654
SET(BOOST_COMPONENTS)
27-
LIST(APPEND BOOST_COMPONENTS date_time system filesystem program_options serialization chrono unit_test_framework locale iostreams)
55+
LIST(APPEND BOOST_COMPONENTS log date_time system filesystem program_options serialization chrono locale thread exception iostreams)
2856
SET( Boost_USE_STATIC_LIBS ON CACHE STRING "ON or OFF" )
2957

58+
#SET(BOOST_ROOT $ENV{BOOST_ROOT})
3059
set(Boost_USE_MULTITHREADED ON)
3160
set(BOOST_ALL_DYN_LINK OFF)
3261

3362
FIND_PACKAGE(Boost 1.65 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
3463
SET(Boost_LIBRARIES ${Boost_LIBRARIES})
3564

36-
include_directories(
37-
"include"
38-
"../../keychain_lib/include"
39-
"../../libraries/kaitai_struct_cpp_stl_runtime"
40-
"../../libraries/fc_light/include"
65+
66+
include_directories("${CMAKE_SOURCE_DIR}/keychain_linux/passentry_gui/include"
67+
# "${AUTOGEN_BUILD_DIR}"
68+
"${CMAKE_SOURCE_DIR}/libraries/fc_light/include"
69+
"${CMAKE_SOURCE_DIR}/keychain_lib/include"
70+
"${CMAKE_SOURCE_DIR}/libraries/kaitai_struct_cpp_stl_runtime"
71+
${Boost_INCLUDE_DIR}
4172
"/usr/include/libcxxabi"
4273
"${OPENSSL_ROOT_DIR}/include"
4374
${Boost_INCLUDE_DIR})
@@ -46,12 +77,13 @@ include_directories(
4677
find_package(Qt5Widgets CONFIG REQUIRED)
4778
find_library(LIB_OPENSSL NAME crypto HINTS "${OPENSSL_ROOT_DIR}/lib")
4879

49-
file(GLOB GUI_SOURCES "./src/*.cpp")
50-
file(GLOB GUI_INCLUDE "./include/*.hpp")
51-
52-
add_executable(passentry_gui ${GUI_SOURCES} ${GUI_INCLUDE})
80+
file(GLOB GUI_SOURCES "${CMAKE_SOURCE_DIR}/keychain_linux/passentry_gui/src/*.cpp")
81+
file(GLOB GUI_INCLUDE "${CMAKE_SOURCE_DIR}/keychain_linux/passentry_gui/include/*.h*")
82+
file(GLOB GUI_RESOURCES "./Resources/*.qrc")
83+
file(GLOB GUI_UIS "./src/*.ui")
5384

85+
add_executable(passentry_gui ${GUI_SOURCES} ${GUI_INCLUDE} ${GUI_RESOURCES} ${GUI_UIS} )
5486

5587
# Use the Widgets module from Qt 5
56-
target_link_libraries(passentry_gui Qt5::Widgets fc_light ${LIB_PTHREAD} ${LIB_OPENSSL} ${Boost_LIBRARIES} )
57-
88+
#target_link_libraries(passentry_gui Qt5::Widgets Qt5::Core Qt5::Qml Qt5::Svg keychain_common secmodlib kaitai_struct_cpp_stl_runtime fc_light ${LIB_PTHREAD} ${LIB_OPENSSL} ${Boost_LIBRARIES} )
89+
target_link_libraries(passentry_gui Qt5::Widgets Qt5::Core keychain_common kaitai_struct_cpp_stl_runtime fc_light ${LIB_PTHREAD} ${LIB_OPENSSL} ${Boost_LIBRARIES} )

keychain_linux/passentry_gui/src/main.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "keychain_gui_win.h"
2+
13
#include "widget.hpp"
24
#include <QApplication>
35
#include <QDesktopWidget>
@@ -9,7 +11,12 @@ Q_DECLARE_METATYPE(std::string)
911
int main(int argc, char *argv[])
1012
{
1113
QApplication a(argc, argv);
12-
Widget w;
14+
// Widget w;
15+
16+
QString srcTrans;
17+
Transaction trans(srcTrans);
18+
19+
keychain_gui_win w(trans);
1320

1421
const QRect sz = QApplication::desktop()->availableGeometry(&w);
1522
w.resize(sz.width() / 6, sz.height() * 1 / 6);
@@ -22,4 +29,3 @@ int main(int argc, char *argv[])
2229

2330

2431

25-

0 commit comments

Comments
 (0)