-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
30 lines (23 loc) · 977 Bytes
/
CMakeLists.txt
File metadata and controls
30 lines (23 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
cmake_minimum_required(VERSION 3.26)
# 최상위 프로젝트
set(J2_LIB_SUPER_VERSION "0.1.0")
project(j2_lib_super VERSION ${J2_LIB_SUPER_VERSION} LANGUAGES CXX)
# -------------------------
# j2_library 라이브러리 서브 프로젝트
# -------------------------
add_subdirectory(j2_library) # j2_library/CMakeLists.txt
# -------------------------
# 예제 서브 프로젝트
# -------------------------
option(BUILD_EXAMPLES "Build Example" ON) # 값을 OFF 설정하거나, cmake -DBUILD_EXAMPLES=OFF 로 하면 예제 빌드하지 않음.
if (BUILD_EXAMPLES)
add_subdirectory(example)
endif()
# -------------------------
# 테스트(Google Test) 서브 프로젝트
# -------------------------
option(BUILD_TESTING "Build Tests" ON) # 값을 OFF 설정하거나, cmake -DBUILD_TESTING=OFF 로 하면 테스트 빌드하지 않음.
if (BUILD_TESTING)
include(CTest) # BUILD_TESTING 옵션 정의
add_subdirectory(tests) # tests/CMakeLists.txt
endif()