2012-11-27 22:23:32 +00:00
|
|
|
|
|
|
|
add_definitions(-D__IDLIB__ -D__DOOM_DLL__)
|
|
|
|
|
|
|
|
file(GLOB_RECURSE ID_INCLUDES *.h)
|
|
|
|
file(GLOB_RECURSE ID_SOURCES *.cpp)
|
|
|
|
|
|
|
|
if(MSVC)
|
2012-12-22 15:18:19 +00:00
|
|
|
list(REMOVE_ITEM ID_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/sys/posix/posix_thread.cpp)
|
2012-12-06 20:31:33 +00:00
|
|
|
else()
|
|
|
|
list(REMOVE_ITEM ID_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/sys/win32/win_thread.cpp)
|
2012-11-27 22:23:32 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
#if(STANDALONE)
|
|
|
|
# add_definitions(-DSTANDALONE)
|
|
|
|
#endif()
|
2012-12-22 15:18:19 +00:00
|
|
|
|
|
|
|
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"
|
|
|
|
)
|
2012-12-22 15:34:02 +00:00
|
|
|
else()
|
|
|
|
include_directories(.)
|
2012-12-22 15:18:19 +00:00
|
|
|
endif()
|
2012-11-27 22:23:32 +00:00
|
|
|
|
|
|
|
add_library(idlib ${ID_SOURCES} ${ID_INCLUDES})
|
2012-12-22 15:18:19 +00:00
|
|
|
|
|
|
|
# if(MSVC)
|
|
|
|
# # set_source_files_properties(precompiled.cpp
|
|
|
|
# # PROPERTIES
|
|
|
|
# # COMPILE_FLAGS "/Ycprecompiled.h"
|
|
|
|
# # )
|
|
|
|
|
|
|
|
# #set_target_properties(idlib PROPERTIES COMPILE_FLAGS "/Yuprecompiled.h")
|
|
|
|
# endif()
|