cmake: Forcefully pass CFLAGS to nanomsg
This commit is contained in:
parent
e0a058c95e
commit
9fe47197b9
1 changed files with 6 additions and 3 deletions
|
@ -18,7 +18,6 @@ endif ()
|
||||||
# Initialization
|
# Initialization
|
||||||
|
|
||||||
include (Options)
|
include (Options)
|
||||||
include (Properties)
|
|
||||||
include (Submodules)
|
include (Submodules)
|
||||||
include (Capabilities)
|
include (Capabilities)
|
||||||
include (Subprojects)
|
include (Subprojects)
|
||||||
|
@ -30,7 +29,9 @@ cr_add_subproject (csptr PATH dependencies/libcsptr
|
||||||
cr_add_subproject (dyncall_s PATH dependencies/dyncall CMAKE IF THEORIES)
|
cr_add_subproject (dyncall_s PATH dependencies/dyncall CMAKE IF THEORIES)
|
||||||
|
|
||||||
if (NOT WIN32)
|
if (NOT WIN32)
|
||||||
set (ENV{CFLAGS} -fPIC)
|
set (NN_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
|
||||||
|
else ()
|
||||||
|
set (NN_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
cr_add_subproject (nanomsg
|
cr_add_subproject (nanomsg
|
||||||
|
@ -40,12 +41,14 @@ cr_add_subproject (nanomsg
|
||||||
-DNN_TOOLS=OFF
|
-DNN_TOOLS=OFF
|
||||||
-DNN_FORK_STRATEGY=RESET
|
-DNN_FORK_STRATEGY=RESET
|
||||||
-DNN_STATIC_LIB=ON
|
-DNN_STATIC_LIB=ON
|
||||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
"-DCMAKE_C_FLAGS=${NN_C_FLAGS}"
|
||||||
CMAKE
|
CMAKE
|
||||||
)
|
)
|
||||||
|
|
||||||
cr_add_subproject (wingetopt PATH dependencies/wingetopt CMAKE IF MSVC)
|
cr_add_subproject (wingetopt PATH dependencies/wingetopt CMAKE IF MSVC)
|
||||||
|
|
||||||
|
include (Properties)
|
||||||
|
|
||||||
add_definitions (-DNN_STATIC_LIB)
|
add_definitions (-DNN_STATIC_LIB)
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
|
|
Loading…
Add table
Reference in a new issue