-
-
Notifications
You must be signed in to change notification settings - Fork 633
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
e8be947
commit b5b845a
Showing
5 changed files
with
41 additions
and
164 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,32 +1,15 @@ | ||
include_directories( | ||
"${CMAKE_CURRENT_SOURCE_DIR}/include/LIEF" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/include" | ||
) | ||
|
||
set(LIEF_C_INCLUDE_FILES | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/ELF.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/PE.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/MachO.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/LIEF.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/logging.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/types.h" | ||
) | ||
|
||
set(LIEF_C_SRC "${CMAKE_CURRENT_LIST_DIR}/logging.cpp") | ||
|
||
if (LIEF_ELF) | ||
include("${CMAKE_CURRENT_LIST_DIR}/ELF/CMakeLists.txt") | ||
if(LIEF_ELF) | ||
add_subdirectory(ELF) | ||
endif() | ||
|
||
if (LIEF_PE) | ||
include("${CMAKE_CURRENT_LIST_DIR}/PE/CMakeLists.txt") | ||
if(LIEF_PE) | ||
add_subdirectory(PE) | ||
endif() | ||
|
||
if (LIEF_MACHO) | ||
include("${CMAKE_CURRENT_LIST_DIR}/MachO/CMakeLists.txt") | ||
if(LIEF_MACHO) | ||
add_subdirectory(MachO) | ||
endif() | ||
|
||
source_group("Header Files\\C API" FILES ${LIEF_C_INCLUDE_FILES}) | ||
|
||
target_sources(LIB_LIEF PRIVATE "${LIEF_C_SRC}" ${LIEF_C_INCLUDE_FILES}) | ||
|
||
target_sources(LIB_LIEF PRIVATE logging.cpp) | ||
target_include_directories(LIB_LIEF PUBLIC | ||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>") |
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,10 @@ | ||
include_directories( | ||
"${CMAKE_CURRENT_SOURCE_DIR}/include/LIEF" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/include" | ||
target_sources(LIB_LIEF PRIVATE | ||
Symbol.cpp | ||
Section.cpp | ||
Segment.cpp | ||
DynamicEntry.cpp | ||
Header.cpp | ||
Binary.cpp | ||
EnumToString.cpp | ||
utils.cpp | ||
) | ||
|
||
set(LIEF_C_ELF_SRC | ||
"${CMAKE_CURRENT_LIST_DIR}/Symbol.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Section.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Segment.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/DynamicEntry.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Header.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Binary.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/EnumToString.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/utils.cpp" | ||
) | ||
|
||
|
||
set(LIEF_API_C_ELF_INCLUDE_FILES_CPP | ||
"${CMAKE_CURRENT_LIST_DIR}/Binary.hpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/DynamicEntry.hpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Header.hpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Section.hpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Segment.hpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Symbol.hpp" | ||
) | ||
|
||
set(LIEF_API_C_ELF_INCLUDE_FILES_C | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/ELF/Binary.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/ELF/DynamicEntry.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/ELF/EnumToString.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/ELF/Header.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/ELF/Section.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/ELF/Segment.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/ELF/Symbol.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/ELF/enums.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/ELF/utils.h" | ||
) | ||
|
||
set(LIEF_C_ELF_INC "${LIEF_API_C_ELF_INCLUDE_FILES_C}" "${LIEF_API_C_ELF_INCLUDE_FILES_CPP}") | ||
|
||
source_group("Source Files\\C API\\ELF" FILES ${LIEF_API_C_ELF_SRC}) | ||
source_group("Header Files\\C API\\ELF" FILES ${LIEF_C_ELF_INC}) | ||
|
||
target_sources(LIB_LIEF PRIVATE "${LIEF_C_ELF_SRC}" "${LIEF_C_ELF_INC}") |
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,45 +1,10 @@ | ||
include_directories( | ||
"${CMAKE_CURRENT_SOURCE_DIR}/include/LIEF" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/include" | ||
target_sources(LIB_LIEF PRIVATE | ||
EnumToString.cpp | ||
Parser.cpp | ||
LoadCommand.cpp | ||
Segment.cpp | ||
Symbol.cpp | ||
Section.cpp | ||
Header.cpp | ||
Binary.cpp | ||
) | ||
|
||
set(LIEF_API_C_MACHO_SRC | ||
"${CMAKE_CURRENT_LIST_DIR}/EnumToString.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Parser.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/LoadCommand.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Segment.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Symbol.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Section.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Header.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Binary.cpp" | ||
) | ||
|
||
|
||
set(LIEF_API_C_MACHO_INCLUDE_FILES_CPP | ||
"${CMAKE_CURRENT_LIST_DIR}/Header.hpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Binary.hpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/LoadCommand.hpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Section.hpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Segment.hpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Symbol.hpp" | ||
) | ||
|
||
|
||
set(LIEF_API_C_MACHO_INCLUDE_FILES_C | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/MachO/enums.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/MachO/Binary.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/MachO/EnumToString.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/MachO/Header.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/MachO/LoadCommand.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/MachO/Section.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/MachO/Segment.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/MachO/Symbol.h" | ||
) | ||
|
||
|
||
set(LIEF_C_MACHO_INC "${LIEF_API_C_MACHO_INCLUDE_FILES_C}" "${LIEF_API_C_MACHO_INCLUDE_FILES_CPP}") | ||
|
||
source_group("Source Files\\C API\\MachO" FILES ${LIEF_API_C_MACHO_SRC}) | ||
source_group("Header Files\\C API\\MachO" FILES ${LIEF_C_MACHO_INC}) | ||
|
||
target_sources(LIB_LIEF PRIVATE "${LIEF_API_C_MACHO_SRC}" ${LIEF_C_MACHO_INC}) |
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,48 +1,11 @@ | ||
include_directories( | ||
"${CMAKE_CURRENT_SOURCE_DIR}/include/LIEF" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/include" | ||
target_sources(LIB_LIEF PRIVATE | ||
Binary.cpp | ||
DosHeader.cpp | ||
Header.cpp | ||
OptionalHeader.cpp | ||
Section.cpp | ||
DataDirectory.cpp | ||
EnumToString.cpp | ||
Import.cpp | ||
ImportEntry.cpp | ||
) | ||
set(LIEF_API_C_PE_SRC | ||
"${CMAKE_CURRENT_LIST_DIR}/Binary.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/DosHeader.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Header.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/OptionalHeader.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Section.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/DataDirectory.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/EnumToString.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Import.cpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/ImportEntry.cpp" | ||
) | ||
|
||
|
||
set(LIEF_API_C_PE_INCLUDE_FILES_CPP | ||
"${CMAKE_CURRENT_LIST_DIR}/Binary.hpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/DataDirectory.hpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/DosHeader.hpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Header.hpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/OptionalHeader.hpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Section.hpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/Import.hpp" | ||
"${CMAKE_CURRENT_LIST_DIR}/ImportEntry.hpp" | ||
) | ||
|
||
set(LIEF_API_C_PE_INCLUDE_FILES_C | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/PE/enums.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/PE/Binary.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/PE/DataDirectory.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/PE/DosHeader.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/PE/EnumToString.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/PE/Header.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/PE/OptionalHeader.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/PE/Section.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/PE/Import.h" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/api/c/include/LIEF/PE/ImportEntry.h" | ||
) | ||
|
||
|
||
set(LIEF_C_PE_INC "${LIEF_API_C_PE_INCLUDE_FILES_C}" "${LIEF_API_C_PE_INCLUDE_FILES_CPP}") | ||
|
||
source_group("Source Files\\C API\\PE" FILES ${LIEF_API_C_PE_SRC}) | ||
source_group("Header Files\\C API\\PE" FILES ${LIEF_C_PE_INC}) | ||
|
||
target_sources(LIB_LIEF PRIVATE "${LIEF_API_C_PE_SRC}" "${LIEF_C_PE_INC}") |
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