|
1 | 1 | ## building ojph_stream_expand |
2 | 2 | ############################## |
3 | 3 |
|
4 | | -if (OJPH_BUILD_STREAM_EXPAND) |
5 | | - |
6 | | - set(CMAKE_CXX_STANDARD 14) |
7 | | - |
8 | | - file(GLOB OJPH_STREAM_EXPAND "*.cpp" "*.h") |
9 | | - file(GLOB OJPH_SOCKETS "../others/ojph_sockets.cpp") |
10 | | - file(GLOB OJPH_SOCKETS_H "../common/ojph_sockets.h") |
11 | | - file(GLOB OJPH_THREADS "../others/ojph_threads.cpp") |
12 | | - file(GLOB OJPH_THREADS_H "../common/ojph_threads.h") |
13 | | - |
14 | | - list(APPEND SOURCES ${OJPH_STREAM_EXPAND} ${OJPH_SOCKETS} ${OJPH_SOCKETS_H} ${OJPH_THREADS} ${OJPH_THREADS_H}) |
15 | | - |
16 | | - source_group("main" FILES ${OJPH_STREAM_EXPAND}) |
17 | | - source_group("others" FILES ${OJPH_SOCKETS} ${OJPH_THREADS}) |
18 | | - source_group("common" FILES ${OJPH_SOCKETS_H} ${OJPH_THREADS_H}) |
19 | | - |
20 | | - add_executable(ojph_stream_expand ${SOURCES}) |
21 | | - target_include_directories(ojph_stream_expand PRIVATE ../common) |
22 | | - if(MSVC) |
23 | | - target_link_libraries(ojph_stream_expand PUBLIC openjph ws2_32) |
24 | | - else() |
25 | | - target_link_libraries(ojph_stream_expand PUBLIC openjph pthread) |
26 | | - endif(MSVC) |
27 | | - |
28 | | - install(TARGETS ojph_stream_expand |
29 | | - EXPORT openjph-config |
30 | | - ) |
31 | | - |
32 | | -endif(OJPH_BUILD_STREAM_EXPAND) |
| 4 | +set(CMAKE_CXX_STANDARD 14) |
| 5 | + |
| 6 | +file(GLOB OJPH_STREAM_EXPAND "*.cpp" "*.h") |
| 7 | +file(GLOB OJPH_SOCKETS "../others/ojph_sockets.cpp") |
| 8 | +file(GLOB OJPH_SOCKETS_H "../common/ojph_sockets.h") |
| 9 | +file(GLOB OJPH_THREADS "../others/ojph_threads.cpp") |
| 10 | +file(GLOB OJPH_THREADS_H "../common/ojph_threads.h") |
| 11 | + |
| 12 | +list(APPEND SOURCES ${OJPH_STREAM_EXPAND} ${OJPH_SOCKETS} ${OJPH_SOCKETS_H} ${OJPH_THREADS} ${OJPH_THREADS_H}) |
| 13 | + |
| 14 | +source_group("main" FILES ${OJPH_STREAM_EXPAND}) |
| 15 | +source_group("others" FILES ${OJPH_SOCKETS} ${OJPH_THREADS}) |
| 16 | +source_group("common" FILES ${OJPH_SOCKETS_H} ${OJPH_THREADS_H}) |
| 17 | + |
| 18 | +add_executable(ojph_stream_expand ${SOURCES}) |
| 19 | +target_include_directories(ojph_stream_expand PRIVATE ../common) |
| 20 | +if(MSVC) |
| 21 | + target_link_libraries(ojph_stream_expand PUBLIC openjph ws2_32) |
| 22 | +else() |
| 23 | + target_link_libraries(ojph_stream_expand PUBLIC openjph pthread) |
| 24 | +endif(MSVC) |
| 25 | + |
| 26 | +install(TARGETS ojph_stream_expand |
| 27 | + EXPORT openjph-config |
| 28 | +) |
0 commit comments