diff options
author | Lukasz Fronc <[email protected]> | 2017-10-15 11:02:29 +0200 |
---|---|---|
committer | Lukasz Fronc <[email protected]> | 2017-10-15 11:02:29 +0200 |
commit | 67f964c2ad49317fa57ba4ca556ded6bc3dad9cf (patch) | |
tree | f746607a1fafc7dc7df333b5da0c073e1b20ac98 | |
parent | a84c120eff13d2fa3eadb41ef7afe0f7819f4d6c (diff) | |
download | enet-67f964c2ad49317fa57ba4ca556ded6bc3dad9cf.tar.gz enet-67f964c2ad49317fa57ba4ca556ded6bc3dad9cf.zip |
CMake source groups added for cleaner VS solutions.
-rw-r--r-- | CMakeLists.txt | 48 |
1 files changed, 34 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f1f9a01..d3d4aa8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ if(MSVC) else() add_definitions(-Wno-error) endif() - + if(HAS_FCNTL) add_definitions(-DHAS_FCNTL=1) endif() @@ -54,21 +54,41 @@ endif() if(HAS_SOCKLEN_T) add_definitions(-DHAS_SOCKLEN_T=1) endif() - + include_directories(${PROJECT_SOURCE_DIR}/include) - + +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 + list.c + packet.c + peer.c + protocol.c + unix.c + win32.c) + +source_group(include FILES ${INCLUDE_FILES}) +source_group(source FILES ${SOURCE_FILES}) + add_library(enet STATIC - callbacks.c - compress.c - host.c - list.c - packet.c - peer.c - protocol.c - unix.c - win32.c - ) + ${INCLUDE_FILES} + ${SOURCE_FILES} +) if (MINGW) target_link_libraries(enet winmm ws2_32) -endif()
\ No newline at end of file +endif() |