used glob instead of manually specifying files. cmake does not recommend this, but we always re-run cmake anyway after adding files since we use vs.

This commit is contained in:
Nick Bolton
2014-02-26 17:46:02 +00:00
parent 92961a5cbc
commit f11c660efb
25 changed files with 201 additions and 540 deletions

View File

@@ -14,36 +14,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set(inc
CNetworkAddress.h
CSocketMultiplexer.h
CTCPListenSocket.h
CTCPSocket.h
CTCPSocketFactory.h
IDataSocket.h
IListenSocket.h
ISocket.h
ISocketFactory.h
ISocketMultiplexerJob.h
TSocketMultiplexerMethodJob.h
XSocket.h
)
file(GLOB headers "*.h")
file(GLOB sources "*.cpp")
set(src
CNetworkAddress.cpp
CSocketMultiplexer.cpp
CTCPListenSocket.cpp
CTCPSocket.cpp
CTCPSocketFactory.cpp
IDataSocket.cpp
XSocket.cpp
)
if (WIN32)
list(APPEND src ${inc})
if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
set(inc
include_directories(
../arch
../base
../common
@@ -53,13 +31,12 @@ set(inc
)
if (UNIX)
list(APPEND inc
include_directories(
../../..
)
endif()
include_directories(${inc})
add_library(net STATIC ${src})
add_library(net STATIC ${sources})
if (UNIX)
target_link_libraries(net mt io)