mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2024-12-11 13:11:47 +00:00
51 lines
1.4 KiB
CMake
51 lines
1.4 KiB
CMake
|
|
add_definitions(-D__IDLIB__ -D__DOOM_DLL__)
|
|
|
|
file(GLOB_RECURSE ID_INCLUDES *.h)
|
|
file(GLOB_RECURSE ID_SOURCES *.cpp)
|
|
|
|
if(MSVC)
|
|
list(REMOVE_ITEM ID_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/sys/posix/posix_thread.cpp)
|
|
else()
|
|
list(REMOVE_ITEM ID_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/sys/win32/win_thread.cpp)
|
|
endif()
|
|
|
|
#if(STANDALONE)
|
|
# add_definitions(-DSTANDALONE)
|
|
#endif()
|
|
|
|
if(MSVC)
|
|
|
|
#set_target_properties(idlib PROPERTIES COMPILE_FLAGS "/Yuprecompiled.h")
|
|
|
|
set(ID_PRECOMPILED_SOURCES ${ID_SOURCES})
|
|
list(REMOVE_ITEM ID_PRECOMPILED_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/geometry/RenderMatrix.cpp)
|
|
list(REMOVE_ITEM ID_PRECOMPILED_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/SoftwareCache.cpp)
|
|
|
|
foreach( src_file ${ID_PRECOMPILED_SOURCES} )
|
|
#message(STATUS "/Yuprecompiled.h for ${src_file}")
|
|
set_source_files_properties(
|
|
${src_file}
|
|
PROPERTIES
|
|
COMPILE_FLAGS "/Yuprecompiled.h"
|
|
)
|
|
endforeach()
|
|
|
|
set_source_files_properties(precompiled.cpp
|
|
PROPERTIES
|
|
COMPILE_FLAGS "/Ycprecompiled.h"
|
|
)
|
|
else()
|
|
include_directories(.)
|
|
endif()
|
|
|
|
add_library(idlib ${ID_SOURCES} ${ID_INCLUDES})
|
|
|
|
# if(MSVC)
|
|
# # set_source_files_properties(precompiled.cpp
|
|
# # PROPERTIES
|
|
# # COMPILE_FLAGS "/Ycprecompiled.h"
|
|
# # )
|
|
|
|
# #set_target_properties(idlib PROPERTIES COMPILE_FLAGS "/Yuprecompiled.h")
|
|
# endif()
|