-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
94107a1
commit 3e3828a
Showing
1 changed file
with
16 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
function(download_bare result) | ||
cmake_parse_arguments( | ||
PARSE_ARGV 1 ARGV "" "IMPORT_FILE" "" | ||
) | ||
|
||
set(import_file ${ARGV_IMPORT_FILE}) | ||
function(add_bare_module result) | ||
bare_module_target("." target NAME name) | ||
|
||
set(${result} $<TARGET_FILE:bare_bin>) | ||
add_library(${target} OBJECT) | ||
|
||
if(import_file) | ||
set(${import_file} $<TARGET_IMPORT_FILE:bare_bin>) | ||
endif() | ||
set_target_properties( | ||
${target} | ||
PROPERTIES | ||
C_STANDARD 11 | ||
CXX_STANDARD 20 | ||
POSITION_INDEPENDENT_CODE ON | ||
) | ||
|
||
return(PROPAGATE ${result} ${import_file}) | ||
endfunction() | ||
target_include_directories( | ||
${target} | ||
PRIVATE | ||
$<TARGET_PROPERTY:bare,INTERFACE_INCLUDE_DIRECTORIES> | ||
) | ||
|
||
function(download_bare_headers result) | ||
set(${result} $<TARGET_PROPERTY:bare,INTERFACE_INCLUDE_DIRECTORIES>) | ||
set(${result} ${target}) | ||
|
||
return(PROPAGATE ${result}) | ||
endfunction() |