mcl: Build as PIC

This commit is contained in:
Merry 2022-04-23 18:35:31 +01:00
parent 4aad0b5e69
commit 761b7c05e8
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.6) project(mcl LANGUAGES CXX VERSION 0.1.7)
# 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)