mirror of
https://github.com/bitdefender/bddisasm.git
synced 2025-06-23 00:48:46 +00:00
Allow users to disable disasmtool and isagenerator targets
This commit is contained in:
parent
dcfd0ea478
commit
42497c3ee6
@ -1,5 +1,8 @@
|
|||||||
cmake_minimum_required(VERSION 3.12)
|
cmake_minimum_required(VERSION 3.12)
|
||||||
|
|
||||||
|
option(BDD_INCLUDE_TOOL "Include the disasmtool executable" ON)
|
||||||
|
option(BDD_INCLUDE_ISAGENERATOR "Include the isagenerator target (if a python interpreter is found)" ON)
|
||||||
|
|
||||||
set(BDD_VER_FILE ${CMAKE_CURRENT_LIST_DIR}/inc/version.h)
|
set(BDD_VER_FILE ${CMAKE_CURRENT_LIST_DIR}/inc/version.h)
|
||||||
|
|
||||||
file(STRINGS ${BDD_VER_FILE} disasm_ver_major REGEX "DISASM_VERSION_MAJOR")
|
file(STRINGS ${BDD_VER_FILE} disasm_ver_major REGEX "DISASM_VERSION_MAJOR")
|
||||||
@ -153,8 +156,8 @@ set_target_properties(
|
|||||||
|
|
||||||
add_library(bddisasm::bdshemu ALIAS bdshemu)
|
add_library(bddisasm::bdshemu ALIAS bdshemu)
|
||||||
|
|
||||||
# If this is the master project (or if the user requested it) add disasmtool.
|
# If this is the master project (and if the user requested it) add disasmtool.
|
||||||
if ((${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME}) OR BDD_INCLUDE_TOOL)
|
if ((${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME}) AND BDD_INCLUDE_TOOL)
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
add_subdirectory(disasmtool)
|
add_subdirectory(disasmtool)
|
||||||
else ()
|
else ()
|
||||||
@ -162,8 +165,8 @@ if ((${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME}) OR BDD_INCLUDE_TOOL)
|
|||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# If this is the master project (or if the user requested it) add isagenerator.
|
# If this is the master project (and if the user requested it) add isagenerator.
|
||||||
if ((${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME}) OR BDD_INCLUDE_ISAGENERATOR)
|
if ((${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME}) AND BDD_INCLUDE_ISAGENERATOR)
|
||||||
add_subdirectory(isagenerator)
|
add_subdirectory(isagenerator)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user