@@ -8,6 +8,7 @@ if(NOT DEFINED JSONCPP_LIBRARIES)
88 endif ()
99 pkg_search_module (JSONCPP REQUIRED jsoncpp )
1010endif ()
11+
1112include_directories (${JSONCPP_INCLUDE_DIRS} )
1213
1314if (NOT DEFINED CRYPTOPP_LIBRARIES)
@@ -16,28 +17,36 @@ if(NOT DEFINED CRYPTOPP_LIBRARIES)
1617 endif ()
1718 pkg_search_module (CRYPTOPP REQUIRED cryptopp )
1819endif ()
19- include_directories (${CRYPTOPP_INCLUDE_DIRS} )
2020
21- set ( CMAKE_CXX_STANDARD 11 )
21+ include_directories ( ${CRYPTOPP_INCLUDE_DIRS} )
2222
2323if (WIN32 )
24+ if (NOT PKGCONFIG_FOUND)
25+ find_package (PkgConfig REQUIRED )
26+ endif ()
27+ pkg_search_module (ICU REQUIRED icu-uc )
28+ include_directories (${ICU_INCLUDE_DIRS} )
2429 set (machine_info_src machine_info_win.cpp)
2530 set (machine_info_libs
26- wbemuuid.lib
31+ ${ICU_LIBRARIES}
32+ wbemuuid.lib
2733 )
2834else ()
2935 set (machine_info_src machine_info_linux.cpp)
3036endif ()
3137
32- set (UID_PUBKEY_BYTES
33- "130,99,238,192,232,47,187,99,222,116,140,101,233,231,57,188,204,204,187,241,173,147,88,60,217,7,80,217"
34- CACHE STRING
35- "the public key used for encryption"
36- )
38+ if (NOT DEFINED UID_PUBKEY_BYTES)
39+ message (WARNING "You need to set UID_PUBKEY_BYTES to the output of int_to_bytes.py. Using test public key." )
40+ set (UID_PUBKEY_BYTES
41+ "130,99,238,192,232,47,187,99,222,116,140,101,233,231,57,188,204,204,187,241,173,147,88,60,217,7,80,217"
42+ CACHE STRING
43+ "the public key used for encryption"
44+ )
45+ endif ()
3746
3847add_definitions (-DUID_PUBKEY_BYTES= "${UID_PUBKEY_BYTES} " )
3948
40- set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS } -static" )
49+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS } -static" )
4150
4251add_executable (uid
4352 uid.cpp
0 commit comments