File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.9.0)
22project (Minecraft-server-query VERSION 0.1.0 LANGUAGES C)
3+ link_libraries ("-static" )
34if (CMAKE_C_COMPILER_ID STREQUAL "GNU" )
45 message (STATUS "GCC" )
56 add_compile_options (-ffunction-sections -fdata-sections)
2526message (WARNING "IPO is not supported: ${output} " )
2627endif ()
2728
28- target_link_libraries (Minecraft-server-query plibsys )
29+ target_link_libraries (Minecraft-server-query plibsysstatic )
2930
3031
3132option (BUILD_EXAMPLE_IMPLEMENTATION "Build example" ON )
@@ -39,4 +40,5 @@ if (BUILD_EXAMPLE_IMPLEMENTATION)
3940 set_property (TARGET msq_example PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE )
4041 endif ()
4142 target_link_libraries (msq_example Minecraft-server-query)
43+ install (TARGETS msq_example)
4244endif ()
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ typedef struct
3030 char * * players ;
3131} msq_full_stats_t ;
3232
33- int msq_init (char * ip , int port );
33+ int msq_init (const char * ip , int port );
3434int msq_get_basic_stats (msq_basic_stats_t * ret );
3535int msq_get_full_stats (msq_full_stats_t * ret );
3636char * msq_get_error (int c );
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ int check_for_endianness()
5151 return (int )* c ;
5252}
5353
54- int msq_init (char * ip , int port )
54+ int msq_init (const char * ip , int port )
5555{
5656 if (init != 0 )
5757 {
You can’t perform that action at this time.
0 commit comments