mcl: Build as PIC

This commit is contained in:
merry 2022-04-23 18:26:08 +01:00
parent 57af72a567
commit e3199f8f65
2 changed files with 2 additions and 1 deletions

View file

@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.12 FATAL_ERROR) cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
include(GNUInstallDirs) include(GNUInstallDirs)
project(mcl LANGUAGES CXX VERSION 0.1.5) project(mcl LANGUAGES CXX VERSION 0.1.6)
# Project options # Project options
option(MCL_WARNINGS_AS_ERRORS "Warnings as errors" ON) option(MCL_WARNINGS_AS_ERRORS "Warnings as errors" ON)

View file

@ -63,6 +63,7 @@ target_include_directories(mcl
) )
target_compile_options(mcl PRIVATE ${MCL_CXX_FLAGS}) target_compile_options(mcl PRIVATE ${MCL_CXX_FLAGS})
target_link_libraries(mcl PUBLIC $<BUILD_INTERFACE:fmt::fmt>) target_link_libraries(mcl PUBLIC $<BUILD_INTERFACE:fmt::fmt>)
set_property(TARGET mcl PROPERTY POSITION_INDEPENDENT_CODE ON)
add_library(merry::mcl ALIAS mcl) add_library(merry::mcl ALIAS mcl)
include(CreateTargetDirectoryGroups) include(CreateTargetDirectoryGroups)