forked from vmt/udis86
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resolved vmt#97 : added files to build with CMake
- Loading branch information
hasherezade
committed
Feb 28, 2015
1 parent
56ff6c8
commit 1b0c2c8
Showing
3 changed files
with
68 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
cmake_minimum_required (VERSION 2.8) | ||
project (udis86) | ||
|
||
# modules: | ||
set (M_LIBUDIS "libudis86") | ||
set (M_UDCLI "udcli") | ||
|
||
# modules paths: | ||
set (LIBUDIS_DIR "${CMAKE_SOURCE_DIR}/${M_LIBUDIS}" CACHE PATH "libudis86 main path") | ||
set (UDCLI_DIR "${CMAKE_SOURCE_DIR}/${M_UDCLI}" CACHE PATH "udcli main path") | ||
|
||
# Add sub-directories | ||
# | ||
# libs | ||
add_subdirectory (libudis86) | ||
get_property (libudis86_location TARGET libudis86 PROPERTY LOCATION) | ||
set (LIBUDIS_LIB ${libudis86_location} CACHE FILE "libudis86 library path") | ||
|
||
# executables | ||
add_subdirectory(udcli) | ||
|
||
# dependencies | ||
add_dependencies(udcli libudis86) |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
cmake_minimum_required (VERSION 2.8) | ||
|
||
project (udis86) | ||
|
||
set (ITAB_H "${CMAKE_CURRENT_LIST_DIR}/itab.h") | ||
set (ITAB_C "${CMAKE_CURRENT_LIST_DIR}/itab.c") | ||
|
||
if(NOT EXISTS ${ITAB_H} OR NOT EXISTS ${ITAB_C} ) | ||
message(FATAL_ERROR "You must generate files: ${ITAB_H}, ${ITAB_C} before you start.") | ||
endif() | ||
|
||
include_directories(../) | ||
|
||
set (udis86_srcs | ||
decode.c | ||
itab.c | ||
syn.c | ||
syn-att.c | ||
syn-intel.c | ||
udis86.c | ||
) | ||
|
||
set (udis86_hdrs | ||
../udis86.h | ||
decode.h | ||
itab.h | ||
extern.h | ||
syn.h | ||
types.h | ||
udint.h | ||
) | ||
|
||
add_library (libudis86 STATIC ${udis86_srcs} ${udis86_hdrs}) |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
cmake_minimum_required (VERSION 2.8) | ||
|
||
project (udcli) | ||
|
||
include_directories(../) | ||
|
||
set (udcli_srcs | ||
udcli.c | ||
) | ||
|
||
add_executable (udcli ${udcli_srcs} ) | ||
target_link_libraries (udcli ${LIBUDIS_LIB}) |