aboutsummaryrefslogtreecommitdiffstats
path: root/apps/higet/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'apps/higet/CMakeLists.txt')
-rw-r--r--apps/higet/CMakeLists.txt51
1 files changed, 34 insertions, 17 deletions
diff --git a/apps/higet/CMakeLists.txt b/apps/higet/CMakeLists.txt
index 1cf14c287..791191872 100644
--- a/apps/higet/CMakeLists.txt
+++ b/apps/higet/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2017-2019 Cisco and/or its affiliates.
+# Copyright (c) 2021-2022 Cisco and/or its affiliates.
# 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:
@@ -11,33 +11,50 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
-set(CMAKE_CXX_STANDARD 14)
+##############################################################
+# Source files
+##############################################################
+list(APPEND APPS_SRC
+ higet.cc
+)
-project(utils)
-set(CMAKE_MODULE_PATH
- ${CMAKE_MODULE_PATH}
- "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/Modules"
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules"
-)
+##############################################################
+# Linker flags
+##############################################################
+if (WIN32)
+ set(CMAKE_EXE_LINKER_FLAGS
+ "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:\"LIBCMT\""
+ )
+endif()
-if (NOT CMAKE_BUILD_TYPE)
- message(STATUS "${PROJECT_NAME}: No build type selected, default to Release")
- set(CMAKE_BUILD_TYPE "Release")
-endif ()
-list(APPEND APPS_SRC
- higet.cc
+##############################################################
+# Compiler options
+##############################################################
+set(COMPILER_OPTIONS
+ ${DEFAULT_COMPILER_OPTIONS}
)
+
+##############################################################
+# Build higet
+##############################################################
if (NOT DISABLE_EXECUTABLES)
build_executable(${HIGET}
SOURCES ${APPS_SRC}
- LINK_LIBRARIES ${LIBTRANSPORT_LIBRARIES} ${WSOCK32_LIBRARY} ${WS2_32_LIBRARY}
- DEPENDS ${LIBTRANSPORT_LIBRARIES}
+ LINK_LIBRARIES
+ ${LIBHICN_LIBRARIES}
+ ${LIBTRANSPORT_LIBRARIES}
+ ${CMAKE_THREAD_LIBS_INIT}
+ ${WSOCK32_LIBRARY}
+ ${WS2_32_LIBRARY}
+ INCLUDE_DIRS
+ PRIVATE ${THIRD_PARTY_INCLUDE_DIRS} ${COMMON_INCLUDE_DIRS}
+ DEPENDS ${LIBTRANSPORT_LIBRARIES} ${THIRD_PARTY_DEPENDENCIES}
COMPONENT ${HICN_APPS}
DEFINITIONS ${COMPILER_DEFINITIONS}
LINK_FLAGS ${LINK_FLAGS}
+ COMPILE_OPTIONS ${COMPILER_OPTIONS}
)
endif ()