@@ -3,38 +3,72 @@ set(CMAKE_CXX_STANDARD 14)
3
3
#set(CMAKE_CXX_FLAGS "-std=c++14 --verbose -fno-limit-debug-info")
4
4
set (CMAKE_CXX_FLAGS "-std=c++14 " )
5
5
6
+ project (testproject )
7
+
8
+
6
9
if (NOT MSVC )
7
10
if ( LIBCXX_BUILD )
8
11
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++" )
9
12
endif ()
10
13
endif ()
11
14
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" )
13
17
14
18
project (passentrygui )
15
19
# Find includes in corresponding build directories
16
20
17
21
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
+
19
26
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)
22
36
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})
23
51
24
52
find_library (LIB_PTHREAD NAME pthread HINTS "/usr/lib/x86_64-linux-gnu" )
25
53
26
54
SET (BOOST_COMPONENTS )
27
- LIST (APPEND BOOST_COMPONENTS date_time system filesystem program_options signals 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 )
28
56
SET ( Boost_USE_STATIC_LIBS ON CACHE STRING "ON or OFF" )
29
57
58
+ #SET(BOOST_ROOT $ENV{BOOST_ROOT})
30
59
set (Boost_USE_MULTITHREADED ON )
31
60
set (BOOST_ALL_DYN_LINK OFF )
32
61
33
62
FIND_PACKAGE (Boost 1.65 REQUIRED COMPONENTS ${BOOST_COMPONENTS} )
34
63
SET (Boost_LIBRARIES ${Boost_LIBRARIES} )
35
64
36
- include_directories (
37
- "../../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}
38
72
"/usr/include/libcxxabi"
39
73
"${OPENSSL_ROOT_DIR} /include"
40
74
${Boost_INCLUDE_DIR} )
@@ -43,12 +77,13 @@ include_directories(
43
77
find_package (Qt5Widgets CONFIG REQUIRED )
44
78
find_library (LIB_OPENSSL NAME crypto HINTS "${OPENSSL_ROOT_DIR} /lib" )
45
79
46
- file (GLOB GUI_SOURCES ". /*.cpp" )
47
- file (GLOB GUI_INCLUDE "./*.hpp " )
48
-
49
- 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" )
50
84
85
+ add_executable (passentry_gui ${GUI_SOURCES} ${GUI_INCLUDE} ${GUI_RESOURCES} ${GUI_UIS} )
51
86
52
87
# Use the Widgets module from Qt 5
53
- target_link_libraries (passentry_gui Qt5::Widgets fc_light ${LIB_PTHREAD} ${LIB_OPENSSL} ${Boost_LIBRARIES} )
54
-
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} )
0 commit comments