Merge pull request #21 from matteovaralta91/master
Porting to Centos 7
| | |
| | | list(APPEND EXTERNAL_LIBS ${DBUS_LIBRARIES}) |
| | | endif(USE_DBUS_IDENTIFIER) |
| | | list(APPEND EXTERNAL_LIBS dl) |
| | | list(APPEND EXTERNAL_LIBS "-Wl,-Bdynamic") |
| | | endif(NOT MSVC) |
| | | |
| | | configure_file ( |
| | |
| | | cmake_minimum_required(VERSION 3.0) |
| | | #cmake_minimum_required(VERSION 3.0) |
| | | cmake_minimum_required(VERSION 2.8.11) |
| | | |
| | | link_directories ( "${CMAKE_CURRENT_SOURCE_DIR}/../install/lib" ) |
| | | include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/../install/include" ) |
| | |
| | | licenseLocation.environmentVariableName = ""; |
| | | EVENT_TYPE result = acquire_license("example", licenseLocation, &licenseInfo); |
| | | PcSignature signature; |
| | | FUNCTION_RETURN generate_ok = generate_user_pc_signature(signature, ETHERNET); |
| | | FUNCTION_RETURN generate_ok = generate_user_pc_signature(signature, DEFAULT); |
| | | |
| | | if (result == LICENSE_OK && licenseInfo.linked_to_pc) { |
| | | CSimpleIniA ini; |
| | |
| | | |
| | | bNeedNewLine = true; |
| | | } |
| | | |
| | | // Append new empty line |
| | | a_oOutput.Write(SI_NEWLINE_A); |
| | | |
| | | return SI_OK; |
| | | } |
| | |
| | | currentDrive = 0; |
| | | while (NULL != (ent = getmntent(aFile))) { |
| | | if ((strncmp(ent->mnt_type, "ext", 3) == 0 |
| | | || strncmp(ent->mnt_type, "xfs", 3) == 0 |
| | | || strncmp(ent->mnt_type, "vfat", 4) == 0 |
| | | || strncmp(ent->mnt_type, "ntfs", 4) == 0) |
| | | && ent->mnt_fsname != NULL |
| | |
| | | if (vm.count("output")) { |
| | | const std::string fname = vm["output"].as<string>(); |
| | | |
| | | fstream ofstream(fname, std::ios::out | std::ios::trunc); |
| | | fstream ofstream(fname, std::ios::out | std::ios::app); |
| | | if (!ofstream.is_open()) { |
| | | cerr << "can't open file [" << fname << "] for output." << endl |
| | | << " error: " << strerror( errno); |