Commit ce87dd94 authored by jan.koester's avatar jan.koester
Browse files

test

parent e58e5ac8
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -17,4 +17,3 @@ include_directories(

add_subdirectory(src)
add_subdirectory(example)
+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
+10 −4
Original line number Diff line number Diff line
@@ -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")

@@ -51,7 +57,7 @@ install(EXPORT gameinfoplusTargets
  FILE
    gameinfoplusTargets.cmake
  NAMESPACE
    Upstream::
    gameinfoplus::
  DESTINATION
    ${ConfigPackageLocation}
)
+7 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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