doom3-bfg/neo/idlib/CMakeLists.txt

52 lines
1.4 KiB
Text
Raw Normal View History

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)
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)
2012-11-27 22:23:32 +00:00
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"
)
2012-12-22 15:34:02 +00:00
else()
include_directories(.)
endif()
2012-11-27 22:23:32 +00:00
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()