1
+ #
2
+ # Copyright 2009-2017 Alibaba Cloud All rights reserved.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ set (public_header_dir ${CMAKE_CURRENT_SOURCE_DIR} /../include )
18
+
19
+ set (aipodcast_public_header
20
+ include /alibabacloud/aipodcast/AIPodcastClient.h
21
+ include /alibabacloud/aipodcast/AIPodcastExport.h )
22
+
23
+ set (aipodcast_public_header_model
24
+ include /alibabacloud/aipodcast/model/PodcastTaskResultQueryRequest.h
25
+ include /alibabacloud/aipodcast/model/PodcastTaskResultQueryResult.h
26
+ include /alibabacloud/aipodcast/model/PodcastTaskSubmitRequest.h
27
+ include /alibabacloud/aipodcast/model/PodcastTaskSubmitResult.h )
28
+
29
+ set (aipodcast_src
30
+ src/AIPodcastClient.cc
31
+ src/model/PodcastTaskResultQueryRequest.cc
32
+ src/model/PodcastTaskResultQueryResult.cc
33
+ src/model/PodcastTaskSubmitRequest.cc
34
+ src/model/PodcastTaskSubmitResult.cc )
35
+
36
+ add_library (aipodcast ${LIB_TYPE}
37
+ ${aipodcast_public_header}
38
+ ${aipodcast_public_header_model}
39
+ ${aipodcast_src} )
40
+
41
+ set_target_properties (aipodcast
42
+ PROPERTIES
43
+ LINKER_LANGUAGE CXX
44
+ ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /lib
45
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /lib
46
+ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /bin
47
+ OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX} aipodcast
48
+ )
49
+
50
+ if (${LIB_TYPE} STREQUAL "SHARED" )
51
+ set_target_properties (aipodcast
52
+ PROPERTIES
53
+ DEFINE_SYMBOL ALIBABACLOUD_AIPODCAST_LIBRARY)
54
+ endif ()
55
+
56
+ target_include_directories (aipodcast
57
+ PRIVATE include
58
+ ${CMAKE_SOURCE_DIR} /core/include
59
+ )
60
+ target_link_libraries (aipodcast
61
+ core)
62
+
63
+ if (CMAKE_HOST_WIN32 )
64
+ ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
65
+ set (jsoncpp_install_dir ${INSTALL_DIR} )
66
+ add_dependencies (aipodcast
67
+ jsoncpp)
68
+ target_include_directories (aipodcast
69
+ PRIVATE ${jsoncpp_install_dir} /include )
70
+ target_link_libraries (aipodcast
71
+ ${jsoncpp_install_dir} /lib/jsoncpp.lib)
72
+ set_target_properties (aipodcast
73
+ PROPERTIES
74
+ COMPILE_OPTIONS "/bigobj" )
75
+ else ()
76
+ target_include_directories (aipodcast
77
+ PRIVATE /usr/include /jsoncpp)
78
+ target_link_libraries (aipodcast
79
+ jsoncpp)
80
+ endif ()
81
+
82
+ install (FILES ${aipodcast_public_header}
83
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} /alibabacloud/aipodcast)
84
+ install (FILES ${aipodcast_public_header_model}
85
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} /alibabacloud/aipodcast/model)
86
+ install (TARGETS aipodcast
87
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
88
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
89
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
90
+ )
0 commit comments