forked from jcelerier/oscpack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
48 lines (36 loc) · 1.35 KB
/
CMakeLists.txt
File metadata and controls
48 lines (36 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
cmake_minimum_required(VERSION 2.6)
project(TestOscpack)
set(CMAKE_INCLUDE_CURRENT_DIR 1)
set(CMAKE_POSITION_INDEPENDENT_CODE 1)
if(WIN32)
set(IpSystemTypePath oscpack/ip/win32)
else()
set(IpSystemTypePath oscpack/ip/posix)
endif()
add_library(oscpack INTERFACE)
target_include_directories(oscpack INTERFACE .)
if(WIN32)
target_link_libraries(oscpack INTERFACE ws2_32 winmm)
endif()
if(OSCPACK_BUILD_EXAMPLES)
add_executable(OscDump examples/OscDump.cpp)
target_link_libraries(OscDump oscpack)
set_target_properties(OscDump PROPERTIES CXX_STANDARD 14)
add_executable(OscUnitTests tests/OscUnitTests.cpp)
target_link_libraries(OscUnitTests oscpack)
add_executable(OscSendTests tests/OscSendTests.cpp)
target_link_libraries(OscSendTests oscpack)
add_executable(OscReceiveTest tests/OscReceiveTest.cpp)
target_link_libraries(OscReceiveTest oscpack)
add_executable(OscDump examples/OscDump.cpp)
target_link_libraries(OscDump oscpack)
add_executable(SimpleReceive examples/SimpleReceive.cpp)
target_link_libraries(SimpleReceive oscpack)
add_executable(SimpleSend examples/SimpleSend.cpp)
target_link_libraries(SimpleSend oscpack)
endif()
if(MSVC)
target_compile_options(oscpack INTERFACE /W4)
elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
target_compile_options(oscpack INTERFACE -Wall -Wextra -Wno-long-long -pedantic)
endif()