-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
61 lines (46 loc) · 1.98 KB
/
CMakeLists.txt
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# // ------------------------------------------------------------------------------
#
# @About:
# This is tutorial-project to demonstrate usage of CMake in building
# shared library for C++.
#
# License: see "LICENSE" file.
# Tools: VSCode, Ninja, CMake, MSBuild (MSVC) || GCC.
# API: C++ 11 is minimum.
# Platforms: Any with C++ 11 support.
#
# // ------------------------------------------------------------------------------
# =================================================================================
# CMake Meta-Data
# =================================================================================
# CMake-Version
cmake_minimum_required ( VERSION 3.6 FATAL_ERROR )
# =================================================================================
# PROJECT
# =================================================================================
# Project Name
set ( PROJECT_NAME "cmake_shared_lib_tutorial" )
# Project Version
set ( PROJECT_VERSION 1.0.0 )
# Configure Project
project ( ${PROJECT_NAME} VERSION ${PROJECT_VERSION} DESCRIPTION "CMake Shared-Library Tutorial" LANGUAGES C CXX )
# C Version
#set ( CMAKE_C_STANDARD 99 )
# C++ Version
#set ( CMAKE_CXX_STANDARD 11 )
# Make Build Libs & Executables to be position-independent, like SHARED libs.
#set ( CMAKE_POSITION_INDEPENDENT_CODE ON )
# =================================================================================
# CONFIGS
# =================================================================================
# Platform, Build-Type, ABI
include ( "${CMAKE_SOURCE_DIR}/cmake/platform_defines.cmake" )
# Binary Output Dir
set ( BIN_DIR "${CMAKE_SOURCE_DIR}/bin/${PLATFORM_DIR}/${BUILD_TYPE_DIR}" )
# =================================================================================
# MODULES
# =================================================================================
# Library
add_subdirectory ( "src/cxx/lib" )
# Executable
add_subdirectory ( "src/cxx/exe" )