forked from pioneerspacesim/pioneer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
7 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,16 @@ | ||
cmake_minimum_required(VERSION 2.6) | ||
cmake_minimum_required(VERSION 3.1) | ||
project(nanosockets C) | ||
|
||
set(NANOSOCKETS_STATIC "0" CACHE BOOL "Create a static library") | ||
set(NANOSOCKETS_SHARED "0" CACHE BOOL "Create a shared library") | ||
|
||
if (MSYS OR MINGW) | ||
set(CMAKE_C_FLAGS "-static") | ||
set(CMAKE_C_FLAGS "-static") | ||
|
||
add_definitions(-DWINVER=0x0601) | ||
add_definitions(-D_WIN32_WINNT=0x0601) | ||
endif() | ||
|
||
if (NANOSOCKETS_STATIC) | ||
add_library(nanosockets_static STATIC nanosockets.c ${SOURCES}) | ||
|
||
if (NOT UNIX) | ||
target_link_libraries(nanosockets_static ws2_32) | ||
SET_TARGET_PROPERTIES(nanosockets_static PROPERTIES PREFIX "") | ||
endif() | ||
endif() | ||
|
||
if (NANOSOCKETS_SHARED) | ||
add_definitions(-DNANOSOCKETS_DLL) | ||
add_library(nanosockets SHARED nanosockets.c ${SOURCES}) | ||
add_library(nanosockets STATIC nanosockets.c ${SOURCES}) | ||
|
||
if (NOT UNIX) | ||
target_link_libraries(nanosockets ws2_32) | ||
SET_TARGET_PROPERTIES(nanosockets PROPERTIES PREFIX "") | ||
endif() | ||
if (NOT UNIX) | ||
target_link_libraries(nanosockets ws2_32) | ||
SET_TARGET_PROPERTIES(nanosockets PROPERTIES PREFIX "") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,4 @@ target_link_libraries(pioneer-core PUBLIC | |
profiler | ||
lz4 | ||
fmt::fmt | ||
nanosockets_static) | ||
nanosockets) |