forked from shabiel/M-Web-Server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
53 lines (43 loc) · 1.58 KB
/
CMakeLists.txt
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
49
50
51
52
53
# Copyright 2019 Christopher Edwards
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Disable warnings generated by the compiler
# This must be before the CMAKE_MODULE_PATH as it changes a default setting
set(MUMPS_NOWARNING ON CACHE BOOL "" FORCE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/ydbcmake/")
project(MWebServer C MUMPS)
cmake_minimum_required(VERSION 2.8)
# Find YottaDB
find_package(YOTTADB REQUIRED)
include_directories("${YOTTADB_INCLUDE_DIRS}")
set(ydb_install_dir ${YOTTADB_INCLUDE_DIRS}/plugin)
set(source_files
src/_webapi.m
src/_webhome.m
src/_webjson.m
src/_webjsonDecode.m
src/_webjsonEncode.m
src/_webreq.m
src/_webrsp.m
src/_webutils.m
src/_weburl.m
)
# Add commands to compile .m files
add_library(ydbmwebserver SHARED ${source_files})
SET_TARGET_PROPERTIES(ydbmwebserver PROPERTIES PREFIX "")
install(FILES ${source_files} DESTINATION ${ydb_install_dir}/r/)
if(MUMPS_UTF8_MODE)
install(TARGETS ydbmwebserver DESTINATION ${ydb_install_dir}/o/utf8)
else()
install(TARGETS ydbmwebserver DESTINATION ${ydb_install_dir}/o/)
endif()