From dcaa3262a2b085fa3ea9769c7eee21d3cd48c834 Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 18 Jul 2014 00:48:22 -0700 Subject: OSSupport/CMakeLists.txt: Replaced glob with list of files --- src/OSSupport/CMakeLists.txt | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) (limited to 'src/OSSupport') diff --git a/src/OSSupport/CMakeLists.txt b/src/OSSupport/CMakeLists.txt index dee60b450..8004d4094 100644 --- a/src/OSSupport/CMakeLists.txt +++ b/src/OSSupport/CMakeLists.txt @@ -3,12 +3,39 @@ cmake_minimum_required (VERSION 2.6) project (MCServer) include_directories ("${PROJECT_SOURCE_DIR}/../") -file(GLOB SOURCE - "*.cpp" - "*.h" -) -add_library(OSSupport ${SOURCE}) +SET (SRCS + CriticalSection.cpp + Errors.cpp + Event.cpp + File.cpp + GZipFile.cpp + IsThread.cpp + ListenThread.cpp + Semaphore.cpp + Sleep.cpp + Socket.cpp + SocketThreads.cpp + Thread.cpp + Timer.cpp) + +SET (HDRS + CriticalSection.h + Errors.h + Event.h + File.h + GZipFile.h + IsThread.h + ListenThread.h + Queue.h + Semaphore.h + Sleep.h + Socket.h + SocketThreads.h + Thread.h + Timer.h) + +add_library(OSSupport ${SRCS} ${HDRS}) if(UNIX) target_link_libraries(OSSupport pthread) -- cgit v1.2.3 From 725d1fd1e2995b1720673c280fea1125ac338b3c Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 18 Jul 2014 13:26:43 -0700 Subject: Subdirs: Only add_library if not using MSVC --- src/OSSupport/CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/OSSupport') diff --git a/src/OSSupport/CMakeLists.txt b/src/OSSupport/CMakeLists.txt index 8004d4094..a42fcbed4 100644 --- a/src/OSSupport/CMakeLists.txt +++ b/src/OSSupport/CMakeLists.txt @@ -35,8 +35,10 @@ SET (HDRS Thread.h Timer.h) -add_library(OSSupport ${SRCS} ${HDRS}) +if(NOT MSVC) + add_library(OSSupport ${SRCS} ${HDRS}) -if(UNIX) - target_link_libraries(OSSupport pthread) + if(UNIX) + target_link_libraries(OSSupport pthread) + endif() endif() -- cgit v1.2.3