@@ -3,38 +3,72 @@ set(CMAKE_CXX_STANDARD 14)
33#set(CMAKE_CXX_FLAGS "-std=c++14 --verbose -fno-limit-debug-info")
44set (CMAKE_CXX_FLAGS "-std=c++14 " )
55
6+ project (testproject)
7+
8+
69if (NOT MSVC )
710 if ( LIBCXX_BUILD )
811 set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++" )
912 endif ()
1013endif ()
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
1418project (passentrygui)
1519# Find includes in corresponding build directories
1620
1721set (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+
1926set (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
2452find_library (LIB_PTHREAD NAME pthread HINTS "/usr/lib/x86_64-linux-gnu" )
2553
2654SET (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)
2856SET ( Boost_USE_STATIC_LIBS ON CACHE STRING "ON or OFF" )
2957
58+ #SET(BOOST_ROOT $ENV{BOOST_ROOT})
3059set (Boost_USE_MULTITHREADED ON )
3160set (BOOST_ALL_DYN_LINK OFF )
3261
3362FIND_PACKAGE (Boost 1.65 REQUIRED COMPONENTS ${BOOST_COMPONENTS} )
3463SET (Boost_LIBRARIES ${Boost_LIBRARIES} )
3564
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}
3872 "/usr/include/libcxxabi"
3973 "${OPENSSL_ROOT_DIR} /include"
4074 ${Boost_INCLUDE_DIR} )
@@ -43,12 +77,13 @@ include_directories(
4377find_package (Qt5Widgets CONFIG REQUIRED)
4478find_library (LIB_OPENSSL NAME crypto HINTS "${OPENSSL_ROOT_DIR} /lib" )
4579
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" )
5084
85+ add_executable (passentry_gui ${GUI_SOURCES} ${GUI_INCLUDE} ${GUI_RESOURCES} ${GUI_UIS} )
5186
5287# 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