diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ba8c41..0bb3c14 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,4 +164,9 @@ set(CPACK_DEBIAN_PACKAGE_DEPENDS "") set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64") set(CPACK_DEBIAN_PACKAGE_SECTION "devel") +if (INCLUDE_TOOL) + add_subdirectory("disasmtool_lix") + add_dependencies(disasmtool bdshemu) +endif() + include(CPack) diff --git a/disasmtool_lix/CMakeLists.txt b/disasmtool_lix/CMakeLists.txt index d3b4989..65fd214 100644 --- a/disasmtool_lix/CMakeLists.txt +++ b/disasmtool_lix/CMakeLists.txt @@ -27,9 +27,6 @@ set(disasmtool_src_files dumpers.cpp ) -find_library(DISASM_LIB bddisasm PATHS "${DISASM_DIRECTORY}/${DISASM_BUILD_PREFIX}/${CMAKE_BUILD_TYPE}" NO_DEFAULT_PATH) -message(STATUS "Disasm lib used: ${DISASM_LIB}") - find_package(RapidJSON) if (RapidJSON_FOUND) @@ -274,6 +271,11 @@ set_target_properties(${PROJECT_NAME} CXX_EXTENSIONS ON ) -target_link_libraries(${CMAKE_PROJECT_NAME} ${DISASM_LIB}) +target_link_directories(${PROJECT_NAME} PRIVATE "${DISASM_DIRECTORY}/bin/x64/${CMAKE_BUILD_TYPE}") +target_link_libraries(${PROJECT_NAME} PRIVATE bddisasm bdshemu) + +INSTALL(TARGETS disasmtool + RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}" + ) unset(DISASM_LIB CACHE)