Skip to content

Commit

Permalink
server link static libary
Browse files Browse the repository at this point in the history
  • Loading branch information
exqt committed Oct 24, 2023
1 parent 5d143f3 commit 7eded62
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ set_target_properties(${TARGET_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
)

# if not debug build then link statically
if(CMAKE_BUILD_TYPE STREQUAL "Release")
target_link_options(${PROJECT_NAME}Server PRIVATE
-static-libgcc
-static-libstdc++
-static
)
endif()

if (NOT TARGET enet)
add_subdirectory(${THIRD_PARTY_DIR}/enet thirdparty/enet)
endif()
Expand Down

0 comments on commit 7eded62

Please sign in to comment.