This commit is contained in:
40
CMakeLists.txt
Normal file
40
CMakeLists.txt
Normal file
@@ -0,0 +1,40 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(CgeNet LANGUAGES C)
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
|
||||
set(SOURCES
|
||||
)
|
||||
|
||||
set(SOURCES_WIN32
|
||||
src/win32/Timer.c
|
||||
)
|
||||
|
||||
set(SOURCES_POSIX
|
||||
src/posix/Timer.c
|
||||
)
|
||||
|
||||
set(HEADERS
|
||||
CgeTimer.h
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
message(STATUS "Platform - Win32")
|
||||
list(APPEND SOURCES ${SOURCES_WIN32})
|
||||
elseif(UNIX)
|
||||
message(STATUS "Platform: Unix (Linux/BSD/MacOS X)")
|
||||
list(APPEND SOURCES ${SOURCES_POSIX})
|
||||
endif()
|
||||
|
||||
add_library(CgeTimer STATIC ${SOURCES} ${HEADERS})
|
||||
|
||||
target_include_directories(CgeTimer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
install(TARGETS CgeTimer
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
|
||||
install(FILES ${HEADERS} DESTINATION include)
|
||||
Reference in New Issue
Block a user