35 lines
902 B
CMake
35 lines
902 B
CMake
cmake_minimum_required(VERSION 3.21)
|
|
|
|
set (PROJECT_VERSION "1.0")
|
|
|
|
project(telc VERSION ${PROJECT_VERSION})
|
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
|
|
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
|
|
|
include_directories(include)
|
|
|
|
#target_include_directories(${PROJECT_NAME} PRIVATE ./lib/libdependency/src)
|
|
|
|
#add_subdirectory(./lib/libdependency/)
|
|
|
|
|
|
add_library(${PROJECT_NAME} SHARED src/example.cpp)
|
|
|
|
|
|
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
|
|
|
|
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
|
|
# G++
|
|
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra)
|
|
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
|
|
# MSVC
|
|
target_compile_options(${PROJECT_NAME} PRIVATE /EHsc /MTd /W2 /c)
|
|
# Set the DLLEXPORT variable to export symbols
|
|
target_compile_definitions(${PROJECT_NAME} PRIVATE WIN_EXPORT)
|
|
endif()
|
|
|
|
#target_link_libraries(${PROJECT_NAME} PRIVATE libdependency)
|