From 5510df77be1ba071fbc05c1337ab00f7d24e860b Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 27 Jan 2020 13:45:19 +0200 Subject: [PATCH] - streamlined CMake configuration of game libraries https://forum.zdoom.org/viewtopic.php?t=67121 --- CMakeLists.txt | 5 --- source/CMakeLists.txt | 46 ++++++++++++++++++---- source/blood/CMakeLists.txt | 67 +------------------------------- source/duke3d/CMakeLists.txt | 73 +---------------------------------- source/exhumed/CMakeLists.txt | 72 +--------------------------------- source/rr/CMakeLists.txt | 69 +-------------------------------- source/sw/CMakeLists.txt | 67 +------------------------------- 7 files changed, 45 insertions(+), 354 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b23491dc..eacf4067a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -410,11 +410,6 @@ add_subdirectory( tools ) add_subdirectory( libraries/gdtoa ) add_subdirectory( wadsrc ) add_subdirectory( source ) -add_subdirectory( source/duke3d ) -add_subdirectory( source/blood ) -add_subdirectory( source/rr ) -add_subdirectory( source/sw ) -add_subdirectory( source/exhumed ) if( NOT CMAKE_CROSSCOMPILING ) export(TARGETS ${CROSS_EXPORTS} FILE "${CMAKE_BINARY_DIR}/ImportExecutables.cmake" ) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 47c1ef954..469beea00 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -839,14 +839,18 @@ set (PCH_SOURCES common/rendering/hwrenderer/utility/hw_shaderpatcher.cpp ) -if( MSVC ) - enable_precompiled_headers( g_pch.h PCH_SOURCES ) - # The original Build code was written with unsigned chars and unfortunately they still haven't been eliminated entirely. - # All other code should stay with signed chars. What a mess... :( -else() - # Temporary solution for compilers other than MSVC - set_source_files_properties( ${PCH_SOURCES} PROPERTIES COMPILE_FLAGS "-include g_pch.h" ) -endif() +macro( use_precompiled_header ) + if( MSVC ) + enable_precompiled_headers( "${ARGV0}/g_pch.h" PCH_SOURCES ) + # The original Build code was written with unsigned chars and unfortunately they still haven't been eliminated entirely. + # All other code should stay with signed chars. What a mess... :( + else() + # Temporary solution for compilers other than MSVC + set_source_files_properties( ${PCH_SOURCES} PROPERTIES COMPILE_FLAGS "-include g_pch.h" ) + endif() +endmacro() + +use_precompiled_header(".") add_executable( ${PROJECT_NAME} WIN32 MACOSX_BUNDLE ${HEADER_FILES} @@ -1036,3 +1040,29 @@ source_group("OpenGL Backend" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/g source_group("Build Engine" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/build/.+") source_group("Build Engine\\Headers" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/build/include/.+") source_group("Build Engine\\Sources" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/build/src/.+") + +macro( add_game_library ) + file( GLOB HEADER_FILES src/*.h ) + if( NOT_COMPILED_SOURCE_FILES ) + set_source_files_properties( ${NOT_COMPILED_SOURCE_FILES} PROPERTIES HEADER_FILE_ONLY TRUE ) + endif() + use_precompiled_header("..") + add_library( ${ARGV0} STATIC + ${PCH_SOURCES} + ${HEADER_FILES} + ${NOT_COMPILED_SOURCE_FILES} + ) +endmacro() + +require_stricmp() +require_strnicmp() + +unset( PCH_SOURCES ) +unset( HEADER_FILES ) +unset( NOT_COMPILED_SOURCE_FILES ) + +add_subdirectory( duke3d ) +add_subdirectory( blood ) +add_subdirectory( rr ) +add_subdirectory( sw ) +add_subdirectory( exhumed ) diff --git a/source/blood/CMakeLists.txt b/source/blood/CMakeLists.txt index 22bd2d307..306638486 100644 --- a/source/blood/CMakeLists.txt +++ b/source/blood/CMakeLists.txt @@ -1,49 +1,5 @@ -cmake_minimum_required( VERSION 3.1.0 ) - -require_stricmp() -require_strnicmp() - -# Build does not work with signed chars! -if (MSVC) - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /J /DNOONE_EXTENSIONS" ) -else() - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -funsigned-char -Wno-missing-braces -Wno-char-subscripts -Wno-unused-variable -DNOONE_EXTENSIONS" ) -endif() - -include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/../../build/include" ) - -if (WIN32) - include_directories( "${ZLIB_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../platform/windows/include" "${CMAKE_CURRENT_SOURCE_DIR}/../../platform/windows/include/vpx") -else () - include_directories( "${ZLIB_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}") -endif() - -include_directories( - ${CMAKE_CURRENT_SOURCE_DIR}/.. - ${CMAKE_CURRENT_SOURCE_DIR}/../build/include - ${CMAKE_CURRENT_SOURCE_DIR}/../audiolib/include - ${CMAKE_CURRENT_SOURCE_DIR}/../libsmackerdec/include - ${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty/include - ${CMAKE_CURRENT_SOURCE_DIR}/../common - ${CMAKE_CURRENT_SOURCE_DIR}/../common/utility - ${CMAKE_CURRENT_SOURCE_DIR}/../common/console - ${CMAKE_CURRENT_SOURCE_DIR}/../common/textures - ${CMAKE_CURRENT_SOURCE_DIR}/../common/fonts - ${CMAKE_CURRENT_SOURCE_DIR}/../common/2d - ${CMAKE_CURRENT_SOURCE_DIR}/../common/music - ${CMAKE_CURRENT_SOURCE_DIR}/../common/input - ${CMAKE_CURRENT_SOURCE_DIR}/../platform - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl_load - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl/system - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl/renderer - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl/shaders - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/hwrenderer/data - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/hwrenderer/postprocessing - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/hwrenderer/utility - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering -) - +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOONE_EXTENSIONS" ) set( PCH_SOURCES src/actor.cpp @@ -120,23 +76,4 @@ set( PCH_SOURCES src/d_menu.cpp ) - -if( MSVC ) - enable_precompiled_headers( ../g_pch.h PCH_SOURCES ) - # The original Build code was written with unsigned chars and unfortunately they still haven't been eliminated entirely. - # All other code should stay with signed chars. What a mess... :( - #set_source_files_properties( ${PCH_SOURCES} PROPERTIES COMPILE_FLAGS "/J" ) -else() - # Temporary solution for compilers other than MSVC - set_source_files_properties( ${PCH_SOURCES} PROPERTIES COMPILE_FLAGS "-include g_pch.h" ) -endif() - -file( GLOB HEADER_FILES - src/*.h - ) -add_library( blood STATIC - ${HEADER_FILES} - ${PCH_SOURCES} - ) - - +add_game_library( blood ) diff --git a/source/duke3d/CMakeLists.txt b/source/duke3d/CMakeLists.txt index 53b8c1065..585e8ae4c 100644 --- a/source/duke3d/CMakeLists.txt +++ b/source/duke3d/CMakeLists.txt @@ -1,58 +1,8 @@ -cmake_minimum_required( VERSION 3.1.0 ) - -require_stricmp() -require_strnicmp() - -# Build does not work with signed chars! -if (MSVC) - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /J" ) -else() - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -funsigned-char -Wno-missing-braces -Wno-char-subscripts -Wno-unused-variable" ) -endif() - -include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/../../build/include" ) - -if (WIN32) - include_directories( "${ZLIB_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../platform/windows/include" "${CMAKE_CURRENT_SOURCE_DIR}/../../platform/windows/include/vpx") -else () - include_directories( "${ZLIB_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../platform/posix") -endif() - -include_directories( - ${CMAKE_CURRENT_SOURCE_DIR}/.. - ${CMAKE_CURRENT_SOURCE_DIR}/../build/include - ${CMAKE_CURRENT_SOURCE_DIR}/../audiolib/include - ${CMAKE_CURRENT_SOURCE_DIR}/../libsmackerdec/include - ${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty/include - ${CMAKE_CURRENT_SOURCE_DIR}/../common - ${CMAKE_CURRENT_SOURCE_DIR}/../common/utility - ${CMAKE_CURRENT_SOURCE_DIR}/../common/console - ${CMAKE_CURRENT_SOURCE_DIR}/../common/textures - ${CMAKE_CURRENT_SOURCE_DIR}/../common/fonts - ${CMAKE_CURRENT_SOURCE_DIR}/../common/2d - ${CMAKE_CURRENT_SOURCE_DIR}/../common/music - ${CMAKE_CURRENT_SOURCE_DIR}/../common/input - ${CMAKE_CURRENT_SOURCE_DIR}/../platform - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl_load - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl/system - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl/renderer - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl/shaders - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/hwrenderer/data - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/hwrenderer/postprocessing - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/hwrenderer/utility - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering - ${CMAKE_CURRENT_SOURCE_DIR}/../${SYSTEM_SOURCES_DIR} - -) - - set( NOT_COMPILED_SOURCE_FILES src/gamestructures.cpp ) - -set_source_files_properties( ${NOT_COMPILED_SOURCE_FILES} PROPERTIES HEADER_FILE_ONLY TRUE ) - + set( PCH_SOURCES src/actors.cpp src/anim.cpp @@ -80,24 +30,5 @@ set( PCH_SOURCES src/soundsdyn.cpp src/d_menu.cpp ) - -if( MSVC ) - enable_precompiled_headers( ../g_pch.h PCH_SOURCES ) - # The original Build code was written with unsigned chars and unfortunately they still haven't been eliminated entirely. - # All other code should stay with signed chars. What a mess... :( - #set_source_files_properties( ${PCH_SOURCES} PROPERTIES COMPILE_FLAGS "/J" ) -else() - # Temporary solution for compilers other than MSVC - set_source_files_properties( ${PCH_SOURCES} PROPERTIES COMPILE_FLAGS "-include g_pch.h" ) -endif() - -file( GLOB HEADER_FILES - src/*.h - ) -add_library( duke3d STATIC - ${HEADER_FILES} - ${PCH_SOURCES} - ${NOT_COMPILED_SOURCE_FILES} - ) - +add_game_library( duke3d ) diff --git a/source/exhumed/CMakeLists.txt b/source/exhumed/CMakeLists.txt index 85d7391cf..561ac317d 100644 --- a/source/exhumed/CMakeLists.txt +++ b/source/exhumed/CMakeLists.txt @@ -1,55 +1,4 @@ -cmake_minimum_required( VERSION 3.1.0 ) -require_stricmp() -require_strnicmp() - -# Build does not work with signed chars! -if (MSVC) - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /J" ) -else() - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -funsigned-char -Wno-missing-braces -Wno-char-subscripts -Wno-unused-variable" ) -endif() - -include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/../../build/include" ) - -if (WIN32) - include_directories( "${ZLIB_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../platform/windows/include" "${CMAKE_CURRENT_SOURCE_DIR}/../../platform/windows/include/vpx") -else () - include_directories( "${ZLIB_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}") -endif() - -include_directories( - ${CMAKE_CURRENT_SOURCE_DIR}/.. - ${CMAKE_CURRENT_SOURCE_DIR}/../build/include - ${CMAKE_CURRENT_SOURCE_DIR}/../libsmackerdec/include - ${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty/include - ${CMAKE_CURRENT_SOURCE_DIR}/../common - ${CMAKE_CURRENT_SOURCE_DIR}/../common/utility - ${CMAKE_CURRENT_SOURCE_DIR}/../common/console - ${CMAKE_CURRENT_SOURCE_DIR}/../common/textures - ${CMAKE_CURRENT_SOURCE_DIR}/../common/fonts - ${CMAKE_CURRENT_SOURCE_DIR}/../common/2d - ${CMAKE_CURRENT_SOURCE_DIR}/../common/music - ${CMAKE_CURRENT_SOURCE_DIR}/../common/input - ${CMAKE_CURRENT_SOURCE_DIR}/../platform - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl_load - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl/system - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl/renderer - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl/shaders - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/hwrenderer/data - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/hwrenderer/postprocessing - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/hwrenderer/utility - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering - ) - - - -#set( NOT_COMPILED_SOURCE_FILES -# src/gamestructures.cpp -#) - -#set_source_files_properties( ${NOT_COMPILED_SOURCE_FILES} PROPERTIES HEADER_FILE_ONLY TRUE ) - set( PCH_SOURCES src/aistuff.cpp src/anims.cpp @@ -108,23 +57,4 @@ set( PCH_SOURCES src/d_menu.cpp ) -if( MSVC ) - enable_precompiled_headers( ../g_pch.h PCH_SOURCES ) - # The original Build code was written with unsigned chars and unfortunately they still haven't been eliminated entirely. - # All other code should stay with signed chars. What a mess... :( - #set_source_files_properties( ${PCH_SOURCES} PROPERTIES COMPILE_FLAGS "/J" ) -else() - # Temporary solution for compilers other than MSVC - set_source_files_properties( ${PCH_SOURCES} PROPERTIES COMPILE_FLAGS "-include g_pch.h" ) -endif() - -file( GLOB HEADER_FILES - src/*.h - ) -add_library( exhumed STATIC - ${HEADER_FILES} - ${PCH_SOURCES} - #${NOT_COMPILED_SOURCE_FILES} - ) - - +add_game_library( exhumed ) diff --git a/source/rr/CMakeLists.txt b/source/rr/CMakeLists.txt index b523eea20..00a741f25 100644 --- a/source/rr/CMakeLists.txt +++ b/source/rr/CMakeLists.txt @@ -1,53 +1,3 @@ -cmake_minimum_required( VERSION 3.1.0 ) - -require_stricmp() -require_strnicmp() - -# Build does not work with signed chars! -if (MSVC) - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /J" ) -else() - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -funsigned-char -Wno-missing-braces -Wno-char-subscripts -Wno-unused-variable" ) -endif() - -include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/../../build/include" ) - -if (WIN32) - include_directories( "${ZLIB_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../platform/windows/include" "${CMAKE_CURRENT_SOURCE_DIR}/../../platform/windows/include/vpx") -else () - include_directories( "${ZLIB_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}") -endif() - -include_directories( - ${CMAKE_CURRENT_SOURCE_DIR}/.. - ${CMAKE_CURRENT_SOURCE_DIR}/../build/include - ${CMAKE_CURRENT_SOURCE_DIR}/../audiolib/include - ${CMAKE_CURRENT_SOURCE_DIR}/../libsmackerdec/include - ${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty/include - ${CMAKE_CURRENT_SOURCE_DIR}/../common - ${CMAKE_CURRENT_SOURCE_DIR}/../common/utility - ${CMAKE_CURRENT_SOURCE_DIR}/../common/console - ${CMAKE_CURRENT_SOURCE_DIR}/../common/textures - ${CMAKE_CURRENT_SOURCE_DIR}/../common/fonts - ${CMAKE_CURRENT_SOURCE_DIR}/../common/2d - ${CMAKE_CURRENT_SOURCE_DIR}/../common/music - ${CMAKE_CURRENT_SOURCE_DIR}/../common/input - ${CMAKE_CURRENT_SOURCE_DIR}/../platform - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl_load - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl/system - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl/renderer - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl/shaders - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/hwrenderer/data - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/hwrenderer/postprocessing - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/hwrenderer/utility - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering -) - - -set( NOT_COMPILED_SOURCE_FILES -) - -set_source_files_properties( ${NOT_COMPILED_SOURCE_FILES} PROPERTIES HEADER_FILE_ONLY TRUE ) set( PCH_SOURCES src/actors.cpp @@ -76,21 +26,4 @@ set( PCH_SOURCES src/soundsdyn.cpp ) -if( MSVC ) - enable_precompiled_headers( ../g_pch.h PCH_SOURCES ) - # The original Build code was written with unsigned chars and unfortunately they still haven't been eliminated entirely. - # All other code should stay with signed chars. What a mess... :( - #set_source_files_properties( ${PCH_SOURCES} PROPERTIES COMPILE_FLAGS "/J" ) -else() - # Temporary solution for compilers other than MSVC - set_source_files_properties( ${PCH_SOURCES} PROPERTIES COMPILE_FLAGS "-include g_pch.h" ) -endif() - -file( GLOB HEADER_FILES - src/*.h - ) -add_library( rr STATIC - ${HEADER_FILES} - ${PCH_SOURCES} - ${NOT_COMPILED_SOURCE_FILES} - ) +add_game_library( rr ) diff --git a/source/sw/CMakeLists.txt b/source/sw/CMakeLists.txt index 5484f2334..3405bd5a8 100644 --- a/source/sw/CMakeLists.txt +++ b/source/sw/CMakeLists.txt @@ -1,49 +1,3 @@ -cmake_minimum_required( VERSION 3.1.0 ) - -require_stricmp() -require_strnicmp() - -# Build does not work with signed chars! -if (MSVC) - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /J" ) -else() - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -funsigned-char -Wno-missing-braces -Wno-char-subscripts -Wno-unused-variable" ) -endif() - -include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/../../build/include" ) - -if (WIN32) - include_directories( "${ZLIB_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../platform/windows/include" "${CMAKE_CURRENT_SOURCE_DIR}/../../platform/windows/include/vpx") -else () - include_directories( "${ZLIB_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}") -endif() - -include_directories( - ${CMAKE_CURRENT_SOURCE_DIR}/.. - ${CMAKE_CURRENT_SOURCE_DIR}/../build/include - ${CMAKE_CURRENT_SOURCE_DIR}/../audiolib/include - ${CMAKE_CURRENT_SOURCE_DIR}/../libsmackerdec/include - ${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty/include - ${CMAKE_CURRENT_SOURCE_DIR}/../common - ${CMAKE_CURRENT_SOURCE_DIR}/../common/utility - ${CMAKE_CURRENT_SOURCE_DIR}/../common/console - ${CMAKE_CURRENT_SOURCE_DIR}/../common/textures - ${CMAKE_CURRENT_SOURCE_DIR}/../common/fonts - ${CMAKE_CURRENT_SOURCE_DIR}/../common/2d - ${CMAKE_CURRENT_SOURCE_DIR}/../common/music - ${CMAKE_CURRENT_SOURCE_DIR}/../common/input - ${CMAKE_CURRENT_SOURCE_DIR}/../platform - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl_load - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl/system - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl/renderer - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl/shaders - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/hwrenderer/data - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/hwrenderer/postprocessing - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/hwrenderer/utility - ${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering -) - - set( PCH_SOURCES src/actor.cpp @@ -120,23 +74,4 @@ set( PCH_SOURCES src/d_menu.cpp ) - -if( MSVC ) - enable_precompiled_headers( ../g_pch.h PCH_SOURCES ) - # The original Build code was written with unsigned chars and unfortunately they still haven't been eliminated entirely. - # All other code should stay with signed chars. What a mess... :( - #set_source_files_properties( ${PCH_SOURCES} PROPERTIES COMPILE_FLAGS "/J" ) -else() - # Temporary solution for compilers other than MSVC - set_source_files_properties( ${PCH_SOURCES} PROPERTIES COMPILE_FLAGS "-include g_pch.h" ) -endif() - -file( GLOB HEADER_FILES - src/*.h - ) -add_library( sw STATIC - ${HEADER_FILES} - ${PCH_SOURCES} - ) - - +add_game_library( sw )