fixed library linkage on linux
This commit is contained in:
parent
143c4cd297
commit
66c4bdc356
|
@ -222,7 +222,7 @@ if (UNIX)
|
|||
set(HAVE_SOCKLEN_T 1)
|
||||
|
||||
# For config.h, save the results based on a template (config.h.in).
|
||||
configure_file(${cmake_dir}/config.h.in ${root_dir}/config.h)
|
||||
configure_file(res/config.h.in ${root_dir}/config.h)
|
||||
|
||||
add_definitions(-DSYSAPI_UNIX=1 -DHAVE_CONFIG_H)
|
||||
|
||||
|
|
|
@ -36,8 +36,6 @@ elseif (UNIX)
|
|||
endif()
|
||||
|
||||
set(inc
|
||||
../..
|
||||
../../lib
|
||||
../../lib/arch
|
||||
../../lib/base
|
||||
../../lib/client
|
||||
|
@ -49,6 +47,12 @@ set(inc
|
|||
../../lib/synergy
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
list(APPEND inc
|
||||
../../..
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(${inc})
|
||||
add_executable(synergyc ${src})
|
||||
target_link_libraries(synergyc
|
||||
|
|
|
@ -38,8 +38,6 @@ elseif (UNIX)
|
|||
endif()
|
||||
|
||||
set(inc
|
||||
../..
|
||||
../../lib
|
||||
../../lib/arch
|
||||
../../lib/base
|
||||
../../lib/common
|
||||
|
@ -51,6 +49,12 @@ set(inc
|
|||
../../lib/server
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
list(APPEND inc
|
||||
../../..
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(${inc})
|
||||
add_executable(synergys ${src})
|
||||
target_link_libraries(synergys
|
||||
|
|
|
@ -53,6 +53,12 @@ set(inc
|
|||
../../tools/gtest/include
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
list(APPEND inc
|
||||
../..
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(${inc})
|
||||
add_executable(integtests ${src})
|
||||
target_link_libraries(integtests
|
||||
|
|
|
@ -89,5 +89,12 @@ set(inc
|
|||
../synergy
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
list(APPEND inc
|
||||
../../..
|
||||
../arch
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(${inc})
|
||||
add_library(libarch STATIC ${src})
|
||||
|
|
|
@ -62,5 +62,12 @@ set(inc
|
|||
../synergy
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
list(APPEND inc
|
||||
../../..
|
||||
../base
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(${inc})
|
||||
add_library(libbase STATIC ${src})
|
||||
|
|
|
@ -37,5 +37,17 @@ set(inc
|
|||
../synergy
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
list(APPEND inc
|
||||
../../..
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
include_directories(${inc})
|
||||
add_library(libclient STATIC ${src})
|
||||
|
||||
if (UNIX)
|
||||
target_link_libraries(libclient
|
||||
libsynergy libio)
|
||||
endif()
|
||||
|
|
|
@ -25,4 +25,10 @@ if (WIN32)
|
|||
list(APPEND src ${inc})
|
||||
endif()
|
||||
|
||||
if (UNIX)
|
||||
include_directories(
|
||||
../../..
|
||||
)
|
||||
endif()
|
||||
|
||||
add_library(libcommon STATIC ${src})
|
||||
|
|
|
@ -37,5 +37,11 @@ set(inc
|
|||
../common
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
list(APPEND inc
|
||||
../../..
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(${inc})
|
||||
add_library(libio STATIC ${src})
|
||||
|
|
|
@ -41,5 +41,11 @@ set(inc
|
|||
../synergy
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
list(APPEND inc
|
||||
../../..
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(${inc})
|
||||
add_library(libmt STATIC ${src})
|
||||
|
|
|
@ -53,5 +53,16 @@ set(inc
|
|||
../synergy
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
list(APPEND inc
|
||||
../../..
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(${inc})
|
||||
add_library(libnet STATIC ${src})
|
||||
|
||||
if (UNIX)
|
||||
target_link_libraries(libnet
|
||||
libmt libio)
|
||||
endif()
|
||||
|
|
|
@ -97,9 +97,20 @@ set(inc
|
|||
../synergy
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
list(APPEND inc
|
||||
../../..
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(${inc})
|
||||
add_library(libplatform STATIC ${src})
|
||||
|
||||
if (WIN32)
|
||||
add_library(synrgyhk SHARED ${inc_hook} ${src_hook})
|
||||
endif()
|
||||
|
||||
if (UNIX)
|
||||
target_link_libraries(libplatform
|
||||
libsynergy)
|
||||
endif()
|
||||
|
|
|
@ -57,5 +57,16 @@ set(inc
|
|||
../synergy
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
list(APPEND inc
|
||||
../../..
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(${inc})
|
||||
add_library(libserver STATIC ${src})
|
||||
|
||||
if (UNIX)
|
||||
target_link_libraries(libserver
|
||||
libsynergy)
|
||||
endif()
|
||||
|
|
|
@ -83,5 +83,16 @@ set(inc
|
|||
../synergy
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
list(APPEND inc
|
||||
../../..
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(${inc})
|
||||
add_library(libsynergy STATIC ${src})
|
||||
|
||||
if (UNIX)
|
||||
target_link_libraries(libsynergy
|
||||
libarch libclient libnet libbase libplatform libmt libserver)
|
||||
endif()
|
||||
|
|
|
@ -31,6 +31,12 @@ set(inc
|
|||
../../tools/gtest/include
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
list(APPEND inc
|
||||
../..
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(${inc})
|
||||
add_executable(unittests ${src})
|
||||
target_link_libraries(unittests
|
||||
|
|
Loading…
Reference in New Issue