mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-08 01:36:46 +08:00
22 lines
557 B
CMake
22 lines
557 B
CMake
cmake_minimum_required(VERSION 3.10)
|
|
project(ipc)
|
|
|
|
add_compile_definitions(__IPC_LIBRARY__)
|
|
if(MSVC)
|
|
add_compile_options(/std:c++17)
|
|
else()
|
|
add_compile_options(-std=gnu++1z)
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
|
|
endif()
|
|
|
|
include_directories(../../include ../../src)
|
|
|
|
if(UNIX)
|
|
file(GLOB DIR_SRCS ../../src/platform/*_linux.cpp)
|
|
else()
|
|
file(GLOB DIR_SRCS ../../src/platform/*_win.cpp)
|
|
endif()
|
|
aux_source_directory(../../src DIR_SRCS)
|
|
|
|
add_library(ipc SHARED ${DIR_SRCS})
|
|
set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../output) |