fixed library linkage on linux

This commit is contained in:
Nick Bolton 2011-04-25 22:10:46 +00:00
parent 143c4cd297
commit 66c4bdc356
15 changed files with 113 additions and 5 deletions

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -89,5 +89,12 @@ set(inc
../synergy
)
if (UNIX)
list(APPEND inc
../../..
../arch
)
endif()
include_directories(${inc})
add_library(libarch STATIC ${src})

View File

@ -62,5 +62,12 @@ set(inc
../synergy
)
if (UNIX)
list(APPEND inc
../../..
../base
)
endif()
include_directories(${inc})
add_library(libbase STATIC ${src})

View File

@ -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()

View File

@ -25,4 +25,10 @@ if (WIN32)
list(APPEND src ${inc})
endif()
if (UNIX)
include_directories(
../../..
)
endif()
add_library(libcommon STATIC ${src})

View File

@ -37,5 +37,11 @@ set(inc
../common
)
if (UNIX)
list(APPEND inc
../../..
)
endif()
include_directories(${inc})
add_library(libio STATIC ${src})

View File

@ -41,5 +41,11 @@ set(inc
../synergy
)
if (UNIX)
list(APPEND inc
../../..
)
endif()
include_directories(${inc})
add_library(libmt STATIC ${src})

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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