-
Notifications
You must be signed in to change notification settings - Fork 959
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: fix installation of std and authenticode libs
- Loading branch information
1 parent
004a246
commit e571dc8
Showing
3 changed files
with
76 additions
and
59 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
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,44 +1,54 @@ | ||
cmake_minimum_required(VERSION 3.13) | ||
|
||
project(stb VERSION 1.0.0 LANGUAGES C) | ||
|
||
add_library(stb STATIC | ||
stb_image.c | ||
stb_image.c | ||
) | ||
|
||
add_library(retdec::deps::stb ALIAS stb) | ||
|
||
target_include_directories(stb | ||
PUBLIC | ||
$<BUILD_INTERFACE:${RETDEC_DEPS_DIR}/stb/include> | ||
$<INSTALL_INTERFACE:${RETDEC_INSTALL_DEPS_INCLUDE_DIR}> | ||
PRIVATE | ||
${CMAKE_CURRENT_SOURCE_DIR} | ||
SYSTEM INTERFACE | ||
$<BUILD_INTERFACE:${RETDEC_DEPS_DIR}/stb/include> | ||
$<INSTALL_INTERFACE:${RETDEC_INSTALL_DEPS_INCLUDE_DIR}> | ||
PRIVATE | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/stb> | ||
) | ||
|
||
set_target_properties(stb | ||
PROPERTIES | ||
OUTPUT_NAME "retdec-stb" | ||
) | ||
|
||
# Disable all warnings from this 3rd party project. | ||
if(MSVC) | ||
target_compile_options(stb PRIVATE "/w") | ||
else() | ||
target_compile_options(stb PRIVATE "-w") | ||
endif() | ||
|
||
# Install includes. | ||
install( | ||
DIRECTORY ${RETDEC_DEPS_DIR}/stb/include/ | ||
DESTINATION ${RETDEC_INSTALL_DEPS_INCLUDE_DIR} | ||
DIRECTORY ${RETDEC_DEPS_DIR}/stb/include/ | ||
DESTINATION ${RETDEC_INSTALL_DEPS_INCLUDE_DIR} | ||
) | ||
|
||
# Install libs. | ||
install(TARGETS stb | ||
EXPORT stb-targets | ||
ARCHIVE DESTINATION ${RETDEC_INSTALL_LIB_DIR} | ||
LIBRARY DESTINATION ${RETDEC_INSTALL_LIB_DIR} | ||
EXPORT stb-targets | ||
ARCHIVE DESTINATION ${RETDEC_INSTALL_LIB_DIR} | ||
LIBRARY DESTINATION ${RETDEC_INSTALL_LIB_DIR} | ||
) | ||
|
||
# Export targets. | ||
install(EXPORT stb-targets | ||
FILE "retdec-stb-targets.cmake" | ||
NAMESPACE retdec::deps:: | ||
DESTINATION ${RETDEC_INSTALL_CMAKE_DIR} | ||
FILE "retdec-stb-targets.cmake" | ||
NAMESPACE retdec::deps:: | ||
DESTINATION ${RETDEC_INSTALL_CMAKE_DIR} | ||
) | ||
|
||
configure_file( | ||
"retdec-stb-config.cmake" | ||
# Install CMake files. | ||
install( | ||
FILES | ||
"${CMAKE_CURRENT_LIST_DIR}/retdec-stb-config.cmake" | ||
@ONLY | ||
DESTINATION | ||
"${RETDEC_INSTALL_CMAKE_DIR}" | ||
) | ||
install( | ||
FILES "${CMAKE_CURRENT_LIST_DIR}/retdec-stb-config.cmake" | ||
DESTINATION ${RETDEC_INSTALL_CMAKE_DIR} | ||
) |
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