Skip to content

Commit

Permalink
add retdec prefix to all cmake targets, scripts, binaries, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterMatula committed Jan 8, 2018
1 parent 5064810 commit 3ad168b
Show file tree
Hide file tree
Showing 61 changed files with 214 additions and 262 deletions.
16 changes: 8 additions & 8 deletions scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

install(PROGRAMS "color-c.py" DESTINATION bin)
install(PROGRAMS "config.sh" DESTINATION bin)
install(PROGRAMS "decompile-archive.sh" DESTINATION bin)
install(PROGRAMS "decompile.sh" DESTINATION bin)
install(PROGRAMS "fileinfo.sh" DESTINATION bin)
install(PROGRAMS "retdec-color-c.py" DESTINATION bin)
install(PROGRAMS "retdec-config.sh" DESTINATION bin)
install(PROGRAMS "retdec-decompile-archive.sh" DESTINATION bin)
install(PROGRAMS "retdec-decompile.sh" DESTINATION bin)
install(PROGRAMS "retdec-fileinfo.sh" DESTINATION bin)
install(PROGRAMS "retdec-tests-runner.sh" DESTINATION bin)
install(PROGRAMS "signature-from-library.sh" DESTINATION bin)
install(PROGRAMS "unpack.sh" DESTINATION bin)
install(PROGRAMS "utils.sh" DESTINATION bin)
install(PROGRAMS "retdec-signature-from-library.sh" DESTINATION bin)
install(PROGRAMS "retdec-unpack.sh" DESTINATION bin)
install(PROGRAMS "retdec-utils.sh" DESTINATION bin)
2 changes: 1 addition & 1 deletion scripts/color-c.py → scripts/retdec-color-c.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
"""
color-c
retdec-color-c
~~~~~~~
Color given C file using the IDA pro tags.
Expand Down
30 changes: 13 additions & 17 deletions scripts/config.sh → scripts/retdec-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@

SCRIPTPATH="$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )"

if [ -z "$DECOMPILER_CONFIG" ]; then
DECOMPILER_CONFIG="./config.sh"
fi

##
## Paths (everything has to be without the ending slash '/').
##
Expand Down Expand Up @@ -56,26 +52,26 @@ BIN2LLVMIR_PARAMS="$BIN2LLVMIR_PARAMS_DISABLES -inst-opt -verify $BIN2LLVMIR_VOL
# The following options are useful during debugging of bin2llvmirl optimizations.
#BIN2LLVMIR_PARAMS+="-print-after-all -debug-only=idioms -print-before=idioms -print-after=idioms"

FILEINFO="$INSTALL_BIN_DIR/fileinfo"
FILEINFO="$INSTALL_BIN_DIR/retdec-fileinfo"
FILEINFO_EXTERNAL_YARA_PRIMARY_CRYPTO_DATABASES=(
"$INSTALL_SHARE_YARA_DIR/signsrch/signsrch.yara"
)
FILEINFO_EXTERNAL_YARA_EXTRA_CRYPTO_DATABASES=(
"$INSTALL_SHARE_YARA_DIR/signsrch/signsrch_regex.yara"
)
AR="$INSTALL_BIN_DIR/ar-extractor"
BIN2PAT="$INSTALL_BIN_DIR/bin2pat"
PAT2YARA="$INSTALL_BIN_DIR/pat2yara"
AR="$INSTALL_BIN_DIR/retdec-ar-extractor"
BIN2PAT="$INSTALL_BIN_DIR/retdec-bin2pat"
PAT2YARA="$INSTALL_BIN_DIR/retdec-pat2yara"
CONFIGTOOL="$INSTALL_BIN_DIR/retdec-config"
EXTRACT="$INSTALL_BIN_DIR/macho-extractor"
DECOMPILE_SH="$INSTALL_BIN_DIR/decompile.sh"
DECOMPILE_ARCHIVE_SH="$INSTALL_BIN_DIR/decompile-archive.sh"
SIG_FROM_LIB_SH="$INSTALL_BIN_DIR/signature-from-library.sh"
UNPACK_SH="$INSTALL_BIN_DIR/unpack.sh"
LLVMIR2HLL="$INSTALL_BIN_DIR/llvmir2hll"
BIN2LLVMIR="$INSTALL_BIN_DIR/bin2llvmir"
IDA_COLORIZER="$INSTALL_BIN_DIR/color-c.py"
UNPACKER="$INSTALL_BIN_DIR/unpacker"
EXTRACT="$INSTALL_BIN_DIR/retdec-macho-extractor"
DECOMPILE_SH="$INSTALL_BIN_DIR/retdec-decompile.sh"
DECOMPILE_ARCHIVE_SH="$INSTALL_BIN_DIR/retdec-decompile-archive.sh"
SIG_FROM_LIB_SH="$INSTALL_BIN_DIR/retdec-signature-from-library.sh"
UNPACK_SH="$INSTALL_BIN_DIR/retdec-unpack.sh"
LLVMIR2HLL="$INSTALL_BIN_DIR/retdec-llvmir2hll"
BIN2LLVMIR="$INSTALL_BIN_DIR/retdec-bin2llvmir"
IDA_COLORIZER="$INSTALL_BIN_DIR/retdec-color-c.py"
UNPACKER="$INSTALL_BIN_DIR/retdec-unpacker"

DEV_NULL="/dev/null"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
SCRIPTPATH="$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )"

if [ -z "$DECOMPILER_UTILS" ]; then
DECOMPILER_UTILS="$SCRIPTPATH/utils.sh"
DECOMPILER_UTILS="$SCRIPTPATH/retdec-utils.sh"
fi

. "$DECOMPILER_UTILS"
Expand Down
2 changes: 1 addition & 1 deletion scripts/decompile.sh → scripts/retdec-decompile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
SCRIPTPATH="$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )"

if [ -z "$DECOMPILER_UTILS" ]; then
DECOMPILER_UTILS="$SCRIPTPATH/utils.sh"
DECOMPILER_UTILS="$SCRIPTPATH/retdec-utils.sh"
fi

. "$DECOMPILER_UTILS"
Expand Down
2 changes: 1 addition & 1 deletion scripts/fileinfo.sh → scripts/retdec-fileinfo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
SCRIPTPATH="$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )"

if [ -z "$DECOMPILER_UTILS" ]; then
DECOMPILER_UTILS="$SCRIPTPATH/utils.sh"
DECOMPILER_UTILS="$SCRIPTPATH/retdec-utils.sh"
fi

. "$DECOMPILER_UTILS"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
SCRIPTPATH="$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )"

if [ -z "$DECOMPILER_UTILS" ]; then
DECOMPILER_UTILS="$SCRIPTPATH/utils.sh"
DECOMPILER_UTILS="$SCRIPTPATH/retdec-utils.sh"
fi

. "$DECOMPILER_UTILS"
Expand Down
2 changes: 1 addition & 1 deletion scripts/retdec-tests-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
SCRIPTPATH="$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )"

if [ -z "$DECOMPILER_CONFIG" ]; then
DECOMPILER_CONFIG="$SCRIPTPATH/config.sh"
DECOMPILER_CONFIG="$SCRIPTPATH/retdec-config.sh"
fi
. "$DECOMPILER_CONFIG"

Expand Down
2 changes: 1 addition & 1 deletion scripts/unpack.sh → scripts/retdec-unpack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ RET_UNPACKER_FAILED=4
SCRIPTPATH="$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )"

if [ -z "$DECOMPILER_UTILS" ]; then
DECOMPILER_UTILS="$SCRIPTPATH/utils.sh"
DECOMPILER_UTILS="$SCRIPTPATH/retdec-utils.sh"
fi

. "$DECOMPILER_UTILS"
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils.sh → scripts/retdec-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
SCRIPTPATH="$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )"

if [ -z "$DECOMPILER_CONFIG" ]; then
DECOMPILER_CONFIG="$SCRIPTPATH/config.sh"
DECOMPILER_CONFIG="$SCRIPTPATH/retdec-config.sh"
fi

. "$DECOMPILER_CONFIG"
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

add_subdirectory(ar-extractor)
add_subdirectory(ar-extractortool)
add_subdirectory(bin2llvmir)
Expand Down
10 changes: 3 additions & 7 deletions src/ar-extractor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ set(AR_EXTRACTOR_SOURCES
detection.cpp
)

if(NOT TARGET ar-extractor)

add_library(ar-extractor STATIC ${AR_EXTRACTOR_SOURCES})
target_link_libraries(ar-extractor retdec-utils rapidjson llvm)
target_include_directories(ar-extractor PUBLIC ${PROJECT_SOURCE_DIR}/include/)

endif()
add_library(retdec-ar-extractor STATIC ${AR_EXTRACTOR_SOURCES})
target_link_libraries(retdec-ar-extractor retdec-utils rapidjson llvm)
target_include_directories(retdec-ar-extractor PUBLIC ${PROJECT_SOURCE_DIR}/include/)
12 changes: 4 additions & 8 deletions src/ar-extractortool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ set(AR_EXTRACTOR_SOURCES
ar_extractor.cpp
)

if(NOT TARGET ar-extractortool)

add_executable(ar-extractortool ${AR_EXTRACTOR_SOURCES})
set_target_properties(ar-extractortool PROPERTIES OUTPUT_NAME "ar-extractor")
target_link_libraries(ar-extractortool ar-extractor retdec-utils rapidjson)
install(TARGETS ar-extractortool RUNTIME DESTINATION bin)

endif()
add_executable(retdec-ar-extractortool ${AR_EXTRACTOR_SOURCES})
set_target_properties(retdec-ar-extractortool PROPERTIES OUTPUT_NAME "retdec-ar-extractor")
target_link_libraries(retdec-ar-extractortool retdec-ar-extractor retdec-utils rapidjson)
install(TARGETS retdec-ar-extractortool RUNTIME DESTINATION bin)
7 changes: 4 additions & 3 deletions src/bin2llvmir/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

set(BIN2LLVMIR_SOURCES
analyses/indirectly_called_funcs_analysis.cpp
analyses/reachable_funcs_analysis.cpp
Expand Down Expand Up @@ -80,6 +81,6 @@ set(BIN2LLVMIR_SOURCES
utils/type.cpp
)

add_library(bin2llvmir STATIC ${BIN2LLVMIR_SOURCES})
target_link_libraries(bin2llvmir ctypesparser loader fileformat debugformat retdec-config demangler capstone2llvmir stacofin llvm-support llvm)
target_include_directories(bin2llvmir PUBLIC ${PROJECT_SOURCE_DIR}/include/)
add_library(retdec-bin2llvmir STATIC ${BIN2LLVMIR_SOURCES})
target_link_libraries(retdec-bin2llvmir retdec-ctypesparser retdec-loader retdec-fileformat retdec-debugformat retdec-config retdec-demangler retdec-capstone2llvmir retdec-stacofin retdec-llvm-support llvm)
target_include_directories(retdec-bin2llvmir PUBLIC ${PROJECT_SOURCE_DIR}/include/)
17 changes: 9 additions & 8 deletions src/bin2llvmirtool/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@

set(BIN2LLVMIRTOOL_SOURCES
bin2llvmir.cpp
)

add_executable(bin2llvmirtool ${BIN2LLVMIRTOOL_SOURCES})
add_executable(retdec-bin2llvmirtool ${BIN2LLVMIRTOOL_SOURCES})

# Due to the implementation of the plugin system in LLVM, we have to link our
# libraries into bin2llvmirtool as a whole.
Expand All @@ -11,19 +12,19 @@ if(MSVC)
# its properties (associated includes, etc.) are not propagated. Therefore, we
# state 'bin2llvmir' twice in target_link_libraries(), first as a target to get
# its properties, second as path to library to link it as a whole.
target_link_libraries(bin2llvmirtool bin2llvmir -WHOLEARCHIVE:$<TARGET_FILE_NAME:bin2llvmir>)
set_property(TARGET bin2llvmirtool APPEND_STRING PROPERTY LINK_FLAGS " /FORCE:MULTIPLE")
target_link_libraries(retdec-bin2llvmirtool retdec-bin2llvmir -WHOLEARCHIVE:$<TARGET_FILE_NAME:retdec-bin2llvmir>)
set_property(TARGET retdec-bin2llvmirtool APPEND_STRING PROPERTY LINK_FLAGS " /FORCE:MULTIPLE")
elseif(APPLE)
target_link_libraries(bin2llvmirtool -Wl,-force_load bin2llvmir)
target_link_libraries(retdec-bin2llvmirtool -Wl,-force_load retdec-bin2llvmir)
else() # Linux
target_link_libraries(bin2llvmirtool -Wl,--whole-archive bin2llvmir -Wl,--no-whole-archive)
target_link_libraries(retdec-bin2llvmirtool -Wl,--whole-archive retdec-bin2llvmir -Wl,--no-whole-archive)
endif()

# Allow the 32b version of bin2llvmir on Windows handle addresses larger than 2
# GB (up to 4 GB).
if(MSVC AND CMAKE_SIZEOF_VOID_P MATCHES "4")
set_property(TARGET bin2llvmirtool APPEND_STRING PROPERTY LINK_FLAGS " /LARGEADDRESSAWARE")
set_property(TARGET retdec-bin2llvmirtool APPEND_STRING PROPERTY LINK_FLAGS " /LARGEADDRESSAWARE")
endif()

set_target_properties(bin2llvmirtool PROPERTIES OUTPUT_NAME "bin2llvmir")
install(TARGETS bin2llvmirtool RUNTIME DESTINATION bin)
set_target_properties(retdec-bin2llvmirtool PROPERTIES OUTPUT_NAME "retdec-bin2llvmir")
install(TARGETS retdec-bin2llvmirtool RUNTIME DESTINATION bin)
6 changes: 3 additions & 3 deletions src/bin2pat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ set(BIN2PAT_SOURCES
bin2pat.cpp
)

add_executable(bin2pat ${BIN2PAT_SOURCES})
target_link_libraries(bin2pat patterngen retdec-utils yaramod)
install(TARGETS bin2pat RUNTIME DESTINATION bin)
add_executable(retdec-bin2pat ${BIN2PAT_SOURCES})
target_link_libraries(retdec-bin2pat retdec-patterngen retdec-utils yaramod)
install(TARGETS retdec-bin2pat RUNTIME DESTINATION bin)
6 changes: 3 additions & 3 deletions src/capstone2llvmir/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ set(CAPSTONE2LLVMIR_SOURCES
capstone2llvmir.cpp
)

add_library(capstone2llvmir STATIC ${CAPSTONE2LLVMIR_SOURCES})
target_link_libraries(capstone2llvmir retdec-utils capstone llvm)
target_include_directories(capstone2llvmir PUBLIC ${PROJECT_SOURCE_DIR}/include/)
add_library(retdec-capstone2llvmir STATIC ${CAPSTONE2LLVMIR_SOURCES})
target_link_libraries(retdec-capstone2llvmir retdec-utils capstone llvm)
target_include_directories(retdec-capstone2llvmir PUBLIC ${PROJECT_SOURCE_DIR}/include/)
8 changes: 4 additions & 4 deletions src/capstone2llvmirtool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(CAPSTONE2LLVMIRTOOL_SOURCES
capstone2llvmir.cpp
)

add_executable(capstone2llvmirtool ${CAPSTONE2LLVMIRTOOL_SOURCES})
set_target_properties(capstone2llvmirtool PROPERTIES OUTPUT_NAME "capstone2llvmir")
target_link_libraries(capstone2llvmirtool retdec-utils capstone2llvmir keystone)
install(TARGETS capstone2llvmirtool RUNTIME DESTINATION bin)
add_executable(retdec-capstone2llvmirtool ${CAPSTONE2LLVMIRTOOL_SOURCES})
set_target_properties(retdec-capstone2llvmirtool PROPERTIES OUTPUT_NAME "retdec-capstone2llvmir")
target_link_libraries(retdec-capstone2llvmirtool retdec-utils retdec-capstone2llvmir keystone)
install(TARGETS retdec-capstone2llvmirtool RUNTIME DESTINATION bin)
10 changes: 3 additions & 7 deletions src/config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ set(RETDEC_CONFIG_SOURCES
vtables.cpp
)

if(NOT TARGET retdec-config)

add_library(retdec-config STATIC ${RETDEC_CONFIG_SOURCES})
target_link_libraries(retdec-config retdec-utils jsoncpp)
target_include_directories(retdec-config PUBLIC ${PROJECT_SOURCE_DIR}/include/)

endif()
add_library(retdec-config STATIC ${RETDEC_CONFIG_SOURCES})
target_link_libraries(retdec-config retdec-utils jsoncpp)
target_include_directories(retdec-config PUBLIC ${PROJECT_SOURCE_DIR}/include/)
12 changes: 4 additions & 8 deletions src/configtool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ set(RETDEC_CONFIGTOOL_SOURCES
configtool.cpp
)

if(NOT TARGET retdec-configtool)

add_executable(retdec-configtool ${RETDEC_CONFIGTOOL_SOURCES})
set_target_properties(retdec-configtool PROPERTIES OUTPUT_NAME "retdec-config")
target_link_libraries(retdec-configtool retdec-config)
install(TARGETS retdec-configtool RUNTIME DESTINATION bin)

endif()
add_executable(retdec-configtool ${RETDEC_CONFIGTOOL_SOURCES})
set_target_properties(retdec-configtool PROPERTIES OUTPUT_NAME "retdec-config")
target_link_libraries(retdec-configtool retdec-config)
install(TARGETS retdec-configtool RUNTIME DESTINATION bin)
10 changes: 3 additions & 7 deletions src/cpdetect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,6 @@ set(CPDETECT_SOURCES
utils/version_solver.cpp
)

if(NOT TARGET cpdetect)

add_library(cpdetect STATIC ${CPDETECT_SOURCES})
target_link_libraries(cpdetect libdwarf fileformat yaracpp tinyxml2)
target_include_directories(cpdetect PUBLIC ${PROJECT_SOURCE_DIR}/include/)

endif()
add_library(retdec-cpdetect STATIC ${CPDETECT_SOURCES})
target_link_libraries(retdec-cpdetect libdwarf retdec-fileformat yaracpp tinyxml2)
target_include_directories(retdec-cpdetect PUBLIC ${PROJECT_SOURCE_DIR}/include/)
10 changes: 3 additions & 7 deletions src/crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ set(CRYPTO_SOURCES
hash_context.cpp
)

if(NOT TARGET fileformat-crypto)

add_library(fileformat-crypto STATIC ${CRYPTO_SOURCES})
target_link_libraries(fileformat-crypto retdec-utils openssl-crypto)
target_include_directories(fileformat-crypto PUBLIC ${PROJECT_SOURCE_DIR}/include/)

endif()
add_library(retdec-fileformat-crypto STATIC ${CRYPTO_SOURCES})
target_link_libraries(retdec-fileformat-crypto retdec-utils openssl-crypto)
target_include_directories(retdec-fileformat-crypto PUBLIC ${PROJECT_SOURCE_DIR}/include/)
6 changes: 3 additions & 3 deletions src/ctypes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ set(CTYPES_SOURCES
void_type.cpp
)

add_library(ctypes STATIC ${CTYPES_SOURCES})
target_link_libraries(ctypes retdec-utils)
target_include_directories(ctypes PUBLIC ${PROJECT_SOURCE_DIR}/include/)
add_library(retdec-ctypes STATIC ${CTYPES_SOURCES})
target_link_libraries(retdec-ctypes retdec-utils)
target_include_directories(retdec-ctypes PUBLIC ${PROJECT_SOURCE_DIR}/include/)
6 changes: 3 additions & 3 deletions src/ctypesparser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ set(CTYPESPARSER_SOURCES
json_ctypes_parser.cpp
)

add_library(ctypesparser STATIC ${CTYPESPARSER_SOURCES})
target_link_libraries(ctypesparser ctypes retdec-utils rapidjson)
target_include_directories(ctypesparser PUBLIC ${PROJECT_SOURCE_DIR}/include/)
add_library(retdec-ctypesparser STATIC ${CTYPESPARSER_SOURCES})
target_link_libraries(retdec-ctypesparser retdec-ctypes retdec-utils rapidjson)
target_include_directories(retdec-ctypesparser PUBLIC ${PROJECT_SOURCE_DIR}/include/)
7 changes: 4 additions & 3 deletions src/debugformat/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

set(DEBUGFORMAT_SOURCES
debugformat.cpp
dwarf.cpp
pdb.cpp
)

add_library(debugformat STATIC ${DEBUGFORMAT_SOURCES})
target_link_libraries(debugformat retdec-config demangler dwarfparser pdbparser)
target_include_directories(debugformat PUBLIC ${PROJECT_SOURCE_DIR}/include/)
add_library(retdec-debugformat STATIC ${DEBUGFORMAT_SOURCES})
target_link_libraries(retdec-debugformat retdec-config retdec-demangler retdec-dwarfparser retdec-pdbparser)
target_include_directories(retdec-debugformat PUBLIC ${PROJECT_SOURCE_DIR}/include/)
4 changes: 2 additions & 2 deletions src/demangler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ set(DEMANGLER_SOURCES
stgrammars/msll.cpp
)

add_library(demangler STATIC ${DEMANGLER_SOURCES})
target_include_directories(demangler PUBLIC ${PROJECT_SOURCE_DIR}/include/)
add_library(retdec-demangler STATIC ${DEMANGLER_SOURCES})
target_include_directories(retdec-demangler PUBLIC ${PROJECT_SOURCE_DIR}/include/)
6 changes: 3 additions & 3 deletions src/demangler_grammar_gen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ set(DEMANGLER_GRAMMAR_GEN_SOURCES
demangler_grammar_gen.cpp
)

add_executable(demangler-grammar-gen ${DEMANGLER_GRAMMAR_GEN_SOURCES})
target_link_libraries(demangler-grammar-gen demangler)
install(TARGETS demangler-grammar-gen RUNTIME DESTINATION bin)
add_executable(retdec-demangler-grammar-gen ${DEMANGLER_GRAMMAR_GEN_SOURCES})
target_link_libraries(retdec-demangler-grammar-gen retdec-demangler)
install(TARGETS retdec-demangler-grammar-gen RUNTIME DESTINATION bin)
8 changes: 4 additions & 4 deletions src/demanglertool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(DEMANGLERTOOL_SOURCES
demangler.cpp
)

add_executable(demanglertool ${DEMANGLERTOOL_SOURCES})
set_target_properties(demanglertool PROPERTIES OUTPUT_NAME "demangler")
target_link_libraries(demanglertool demangler)
install(TARGETS demanglertool RUNTIME DESTINATION bin)
add_executable(retdec-demanglertool ${DEMANGLERTOOL_SOURCES})
set_target_properties(retdec-demanglertool PROPERTIES OUTPUT_NAME "retdec-demangler")
target_link_libraries(retdec-demanglertool retdec-demangler)
install(TARGETS retdec-demanglertool RUNTIME DESTINATION bin)
7 changes: 4 additions & 3 deletions src/dwarfparser/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

set(DWARFPARSER_SOURCES
dwarf_base.cpp
dwarf_cu.cpp
Expand All @@ -11,6 +12,6 @@ set(DWARFPARSER_SOURCES
dwarf_vars.cpp
)

add_library(dwarfparser STATIC ${DWARFPARSER_SOURCES})
target_link_libraries(dwarfparser fileformat retdec-utils libdwarf)
target_include_directories(dwarfparser PUBLIC ${PROJECT_SOURCE_DIR}/include/)
add_library(retdec-dwarfparser STATIC ${DWARFPARSER_SOURCES})
target_link_libraries(retdec-dwarfparser retdec-fileformat retdec-utils libdwarf)
target_include_directories(retdec-dwarfparser PUBLIC ${PROJECT_SOURCE_DIR}/include/)
Loading

0 comments on commit 3ad168b

Please sign in to comment.