sandeepindia | e64778d | 2022-12-06 00:17:19 +0530 | [diff] [blame] | 1 | # ================================================================================== |
| 2 | # Copyright (c) 2020 HCL Technologies Limited. |
| 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 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") |
| 17 | set(CMAKE_CXX_STANDARD 17) |
| 18 | # BUILD TYPE |
| 19 | message("A ${CMAKE_BUILD_TYPE} build configuration is detected") |
| 20 | message("CPP flag is ${CMAKE_CXX_FLAGS} ") |
| 21 | message("CPP standard is ${CMAKE_CXX_STANDARD} ") |
| 22 | |
| 23 | #include_directories( "${srcd}/src/rest-server") |
| 24 | #SOURCE FILES |
| 25 | file(GLOB SOURCE_FILES "${srcd}/src/rest-server/*.cpp" ) |
| 26 | |
| 27 | |
| 28 | add_library(rest-server_objects OBJECT ${SOURCE_FILES}) |
| 29 | |
| 30 | target_include_directories (rest-server_objects PUBLIC |
| 31 | $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 32 | $<INSTALL_INTERFACE:include> |
| 33 | PRIVATE src) |
| 34 | |
| 35 | # header files should go into .../include/xfcpp/ |
| 36 | |
| 37 | file(GLOB SOURCE_INSTALL_FILES "${srcd}/src/rest-server/*.h") |
| 38 | #set( install_inc_server "include/ricxfcpp/rest-server" ) |
| 39 | |
| 40 | if( DEV_PKG ) |
| 41 | install( FILES |
| 42 | ${SOURCE_INSTALL_FILES} |
| 43 | DESTINATION ${install_inc} |
| 44 | ) |
| 45 | endif() |
| 46 | |
| 47 | |
| 48 | |