@@ -7,21 +7,21 @@ set(BUILD_MINOR "4")
7
7
set (BUILD_VERSION "3" )
8
8
set (BUILD_VERSION ${BUILD_MAJOR} .${BUILD_MINOR} .${BUILD_VERSION} )
9
9
10
- SET (CLSOCKET_HEADERS
10
+ set (CLSOCKET_HEADERS
11
11
src/ActiveSocket.h
12
12
src/Host.h
13
13
src/PassiveSocket.h
14
14
src/SimpleSocket.h
15
15
src/StatTimer.h
16
16
)
17
17
18
- SET (CLSOCKET_SOURCES
18
+ set (CLSOCKET_SOURCES
19
19
src/SimpleSocket.cpp
20
20
src/ActiveSocket.cpp
21
21
src/PassiveSocket.cpp
22
22
)
23
23
24
- OPTION (BUILD_SHARED_LIBS "Build libs as shared" ON )
24
+ option (BUILD_SHARED_LIBS "Build libs as shared" ON )
25
25
if (DEFINED CLSOCKET_SHARED)
26
26
message (FATAL_ERROR "The CLSOCKET_SHARED option is deprecated, instead use BUILD_SHARED_LIBS." )
27
27
endif ()
@@ -31,7 +31,7 @@ endif()
31
31
32
32
# make the lib
33
33
# add headers so that they appear in IDEs
34
- ADD_LIBRARY (clsocket ${CLSOCKET_SOURCES} ${CLSOCKET_HEADERS} )
34
+ add_library (clsocket ${CLSOCKET_SOURCES} ${CLSOCKET_HEADERS} )
35
35
target_include_directories (clsocket PUBLIC src)
36
36
if (WIN32 )
37
37
add_definitions (-D_WINSOCK_DEPRECATED_NO_WARNINGS)
@@ -51,17 +51,17 @@ set_target_properties(clsocket PROPERTIES VERSION ${BUILD_VERSION}
51
51
SOVERSION ${BUILD_MAJOR} )
52
52
53
53
if (UNIX )
54
- OPTION (CLSOCKET_EXAMPLES "Build the examples" OFF )
54
+ option (CLSOCKET_EXAMPLES "Build the examples" OFF )
55
55
56
56
if (CLSOCKET_EXAMPLES)
57
- ADD_EXECUTABLE (clsocket-example examples/RecvAsync.cpp)
57
+ add_executable (clsocket-example examples/RecvAsync.cpp)
58
58
target_link_libraries (clsocket-example clsocket pthread)
59
59
install (TARGETS clsocket-example DESTINATION bin)
60
60
61
- ADD_EXECUTABLE (querydaytime-example examples/QueryDayTime.cpp)
61
+ add_executable (querydaytime-example examples/QueryDayTime.cpp)
62
62
target_link_libraries (querydaytime-example clsocket)
63
63
64
- ADD_EXECUTABLE (echoserver-example examples/EchoServer.cpp)
64
+ add_executable (echoserver-example examples/EchoServer.cpp)
65
65
target_link_libraries (echoserver-example clsocket)
66
66
endif ()
67
67
endif ()
0 commit comments