diff --git a/CMakeLists.txt b/CMakeLists.txt index d24c431e4f..0ca11215b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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