-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTargoman.cmake
21 lines (20 loc) · 1.04 KB
/
Targoman.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function(setup_bs_paths)
get_directory_property(has_parent_directory PARENT_DIRECTORY)
if(has_parent_directory)
return()
endif()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/out/bin" PARENT_SCOPE)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/out/lib" PARENT_SCOPE)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/out/lib/static" PARENT_SCOPE)
set(CMAKE_INCLUDE_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/out/include" PARENT_SCOPE)
include_directories(./out/include)
link_directories(./out/lib/static ./out/lib)
message("Setting up build system done :)")
endfunction(setup_bs_paths)
function(export_public_headers target_name)
get_target_property(public_headers ${target_name} PUBLIC_HEADER)
foreach(public_header ${public_headers})
get_filename_component(basename ${public_header} NAME)
configure_file(${public_header} ${CMAKE_INCLUDE_OUTPUT_DIRECTORY}/lib${target_name}/${basename} COPYONLY)
endforeach(public_header)
endfunction(export_public_headers)