29 lines
561 B
CMake
29 lines
561 B
CMake
cmake_minimum_required(VERSION 3.18..3.30)
|
|
project(jutils
|
|
VERSION 1.0
|
|
LANGUAGES CXX)
|
|
|
|
if (PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
|
|
message(FATAL_ERROR "In-source builds are not allowed!")
|
|
endif()
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
file(GLOB_RECURSE HEADERS "include/*.hpp")
|
|
file(GLOB_RECURSE SOURCES "src/*.cpp")
|
|
|
|
include_directories("include")
|
|
|
|
if (UNIX)
|
|
add_library(jutils SHARED ${SOURCES})
|
|
endif()
|
|
|
|
if (WIN32)
|
|
add_library(jutils STATIC ${SOURCES})
|
|
endif()
|
|
|
|
|
|
add_executable(jutils_app main.cpp)
|
|
|
|
target_link_libraries(jutils_app jutils)
|