CMake source groups added for cleaner VS solutions.

This commit is contained in:
Lukasz Fronc 2017-10-15 11:02:29 +02:00
parent a84c120eff
commit 67f964c2ad

View file

@ -57,7 +57,20 @@ endif()
include_directories(${PROJECT_SOURCE_DIR}/include)
add_library(enet STATIC
set(INCLUDE_FILES_PREFIX include/enet)
set(INCLUDE_FILES
${INCLUDE_FILES_PREFIX}/callbacks.h
${INCLUDE_FILES_PREFIX}/enet.h
${INCLUDE_FILES_PREFIX}/list.h
${INCLUDE_FILES_PREFIX}/protocol.h
${INCLUDE_FILES_PREFIX}/time.h
${INCLUDE_FILES_PREFIX}/types.h
${INCLUDE_FILES_PREFIX}/unix.h
${INCLUDE_FILES_PREFIX}/utility.h
${INCLUDE_FILES_PREFIX}/win32.h
)
set(SOURCE_FILES
callbacks.c
compress.c
host.c
@ -66,7 +79,14 @@ add_library(enet STATIC
peer.c
protocol.c
unix.c
win32.c
win32.c)
source_group(include FILES ${INCLUDE_FILES})
source_group(source FILES ${SOURCE_FILES})
add_library(enet STATIC
${INCLUDE_FILES}
${SOURCE_FILES}
)
if (MINGW)