Merge pull request #6616 from lioncash/bochs

CMakeLists: Don't dump bochs' includes into the top-level directory
This commit is contained in:
Léo Lam 2018-04-09 12:50:37 +02:00 committed by GitHub
commit 049736b15d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 15 deletions

View File

@ -521,20 +521,21 @@ endif()
# Process externals and setup their include directories # Process externals and setup their include directories
# #
# NOTES about adding Externals: # NOTES about adding Externals:
# - add the include directory here # - If an external provides a target, or one can be introduced with find_package, consider using it.
# - If a target doesn't exist, consider introducing a target for it with add_library and adding all necessary
# includes, definitions, etc, to that target. This way, only libraries that need those attributes simply
# need to link that target in, as opposed to them being provided to every library
# (which is the case with the directory-based include_directories, add_definitions, etc)
#
# - make sure to tell cmake to link them statically or dynamically (most # - make sure to tell cmake to link them statically or dynamically (most
# should be linked statically) # should be linked statically)
# - place the CMakeLists.txt in the first-level subdirectory, e.g. # - place the CMakeLists.txt in the first-level subdirectory, e.g.
# Externals/zlib/CMakeLists.txt (that is: NOT in some Src/ subdirectory) # Externals/zlib/CMakeLists.txt (that is: NOT in some Src/ subdirectory)
# #
add_subdirectory(Externals/Bochs_disasm) add_subdirectory(Externals/Bochs_disasm)
include_directories(Externals/Bochs_disasm)
add_subdirectory(Externals/glslang)
add_subdirectory(Externals/pugixml)
add_subdirectory(Externals/cpp-optparse) add_subdirectory(Externals/cpp-optparse)
add_subdirectory(Externals/glslang)
add_subdirectory(Externals/pugixml)
if(USE_SHARED_ENET) if(USE_SHARED_ENET)
check_lib(ENET libenet enet enet/enet.h QUIET) check_lib(ENET libenet enet enet/enet.h QUIET)

View File

@ -1,10 +1,18 @@
set(SRCS dis_decode.cc add_library(bdisasm STATIC
dis_groups.cc dis_decode.cc
resolve.cc dis_groups.cc
syntax.cc) resolve.cc
syntax.cc
)
if(WIN32) if (WIN32)
set(SRCS ${SRCS} stdafx.cc) target_sources(bdisasm
endif(WIN32) PRIVATE
stdafx.cc
)
endif()
add_library(bdisasm STATIC ${SRCS}) target_include_directories(bdisasm
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)