Loading CMakeLists.txt +0 −1 Original line number Diff line number Diff line Loading @@ -17,4 +17,3 @@ include_directories( add_subdirectory(src) add_subdirectory(example) example/CMakeLists.txt +6 −1 Original line number Diff line number Diff line add_executable(hldshello hldsinfo.cpp) add_dependencies(hldshello gameinfoplus) target_include_directories(hldshello PUBLIC ${CMAKE_SOURCE_DIR}/src) target_link_libraries(hldshello gameinfoplus) No newline at end of file src/CMakeLists.txt +10 −4 Original line number Diff line number Diff line Loading @@ -5,9 +5,15 @@ list(APPEND hldsviewsrc exception.cpp ) if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows") add_library(gameinfoplus STATIC ${hldsviewsrc}) else() add_library(gameinfoplus SHARED ${hldsviewsrc}) endif() target_link_libraries(gameinfoplus netplus::netplus) set_target_properties(gameinfoplus PROPERTIES GLOBAL_TARGET_SCOPE ON) target_link_libraries(gameinfoplus PUBLIC netplus::netplus) target_compile_options(gameinfoplus PUBLIC "-fPIC") Loading Loading @@ -51,7 +57,7 @@ install(EXPORT gameinfoplusTargets FILE gameinfoplusTargets.cmake NAMESPACE Upstream:: gameinfoplus:: DESTINATION ${ConfigPackageLocation} ) Loading src/gameinfoplus.h +7 −1 Original line number Diff line number Diff line Loading @@ -22,8 +22,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include <string> #ifdef Windows #define EXPORT extern "C" __declspec(dllexport) #else #define EXPORT extern "C" #endif namespace gameinfo { class GameInfoData{ EXPORT class GameInfoData{ public: int Port; std::string GameName; Loading src/hldsview.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ gameinfo::HldsView::HldsView(const HldsView &view){ void gameinfo::HldsView::refresh(HldsData &info){ const std::lock_guard<std::mutex> lock(rlock); clientSocket->connect(serverSocket); clientSocket->setTimeout(1); // clientSocket->setTimeout(1); size_t rcv=0; try{ Loading Loading
CMakeLists.txt +0 −1 Original line number Diff line number Diff line Loading @@ -17,4 +17,3 @@ include_directories( add_subdirectory(src) add_subdirectory(example)
example/CMakeLists.txt +6 −1 Original line number Diff line number Diff line add_executable(hldshello hldsinfo.cpp) add_dependencies(hldshello gameinfoplus) target_include_directories(hldshello PUBLIC ${CMAKE_SOURCE_DIR}/src) target_link_libraries(hldshello gameinfoplus) No newline at end of file
src/CMakeLists.txt +10 −4 Original line number Diff line number Diff line Loading @@ -5,9 +5,15 @@ list(APPEND hldsviewsrc exception.cpp ) if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows") add_library(gameinfoplus STATIC ${hldsviewsrc}) else() add_library(gameinfoplus SHARED ${hldsviewsrc}) endif() target_link_libraries(gameinfoplus netplus::netplus) set_target_properties(gameinfoplus PROPERTIES GLOBAL_TARGET_SCOPE ON) target_link_libraries(gameinfoplus PUBLIC netplus::netplus) target_compile_options(gameinfoplus PUBLIC "-fPIC") Loading Loading @@ -51,7 +57,7 @@ install(EXPORT gameinfoplusTargets FILE gameinfoplusTargets.cmake NAMESPACE Upstream:: gameinfoplus:: DESTINATION ${ConfigPackageLocation} ) Loading
src/gameinfoplus.h +7 −1 Original line number Diff line number Diff line Loading @@ -22,8 +22,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include <string> #ifdef Windows #define EXPORT extern "C" __declspec(dllexport) #else #define EXPORT extern "C" #endif namespace gameinfo { class GameInfoData{ EXPORT class GameInfoData{ public: int Port; std::string GameName; Loading
src/hldsview.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ gameinfo::HldsView::HldsView(const HldsView &view){ void gameinfo::HldsView::refresh(HldsData &info){ const std::lock_guard<std::mutex> lock(rlock); clientSocket->connect(serverSocket); clientSocket->setTimeout(1); // clientSocket->setTimeout(1); size_t rcv=0; try{ Loading