Include common headers in cmake projects.

This commit is contained in:
learn_more 2015-04-23 20:39:48 +02:00
parent 4b6026a6e6
commit caf47a5678

View File

@ -64,6 +64,19 @@ set(HEADERS_ENGINE
include/platform.h
)
set(HEADERS_COMMON
include/arm64.h
include/arm.h
include/capstone.h
include/mips.h
include/ppc.h
include/x86.h
include/sparc.h
include/systemz.h
include/xcore.h
include/platform.h
)
set(TEST_SOURCES test.c test_detail.c test_skipdata.c test_iter.c)
@ -272,6 +285,7 @@ set(ALL_SOURCES
)
set(ALL_HEADERS
${HEADERS_COMMON}
${HEADERS_ENGINE}
${HEADERS_ARM}
${HEADERS_ARM64}
@ -348,6 +362,7 @@ source_group("Source\\SystemZ" FILES ${SOURCES_SYSZ})
source_group("Source\\X86" FILES ${SOURCES_X86})
source_group("Source\\XCore" FILES ${SOURCES_XCORE})
source_group("Include\\Common" FILES ${HEADERS_COMMON})
source_group("Include\\Engine" FILES ${HEADERS_ENGINE})
source_group("Include\\ARM" FILES ${HEADERS_ARM})
source_group("Include\\ARM64" FILES ${HEADERS_ARM64})
@ -359,10 +374,7 @@ source_group("Include\\X86" FILES ${HEADERS_X86})
source_group("Include\\XCore" FILES ${HEADERS_XCORE})
## installation
set(INCLUDES arm64.h arm.h capstone.h mips.h ppc.h x86.h sparc.h systemz.h xcore.h platform.h)
foreach (INC ${INCLUDES})
install(FILES "include/${INC}" DESTINATION include/capstone)
endforeach ()
install(FILES ${HEADERS_COMMON} DESTINATION include/capstone)
if (CAPSTONE_BUILD_STATIC)
install(TARGETS capstone-static