-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
28 lines (23 loc) · 1010 Bytes
/
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
cmake_minimum_required(VERSION 3.16)
project (RegNumGen
LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
message(STATUS "\n-------------------------------------------")
message(STATUS "\n-- CMake: Configuring and building RegularNumGen.\n--")
message(STATUS "----------------------------------------")
if (BUILD_SHARED_LIBS)
set (CMAKE_SKIP_BUILD_RPATH FALSE)
set (CMAKE_SKIP_INSTALL_RPATH FALSE)
set (CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
set (CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_RPATH}")
else ()
SET (CMAKE_SKIP_INSTALL_RPATH ON CACHE BOOL "Turn off for static install." FORCE)
SET (CMAKE_SKIP_RPATH ON CACHE BOOL "Turn off for static install." FORCE)
endif ()
add_library (libRegNumGen regular_numbers.cc)
add_executable (RegNumGen driver.cc)
target_link_libraries (RegNumGen LINK_PUBLIC libRegNumGen)
install(TARGETS libRegNumGen RegNumGen)