blob: 2c8b080dd29a7a28d6c5ce375fcc16af0281be18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
include_directories(.)
file(GLOB SOURCES "src/*.h" "src/*.cpp" "res/*.rc")
set(STDAFX "${CMAKE_CURRENT_SOURCE_DIR}/src/stdafx.cxx")
if ((EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/stdafx.h") AND (EXISTS ${STDAFX}))
file(GLOB PRECOMPILED_SOURCES "src/*.cpp")
SET_SOURCE_FILES_PROPERTIES(${PRECOMPILED_SOURCES} PROPERTIES COMPILE_FLAGS "/Yu\"stdafx.h\" /Fp\"${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.pch\"")
SET_SOURCE_FILES_PROPERTIES(${STDAFX} PROPERTIES COMPILE_FLAGS "/Yc\"stdafx.h\" /Fp\"${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.pch\"")
add_library(${TARGET} SHARED ${STDAFX} ${SOURCES})
else()
add_library(${TARGET} SHARED ${SOURCES})
endif()
set_target_properties(${TARGET} PROPERTIES
LINK_FLAGS "/SUBSYSTEM:WINDOWS"
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/$<CONFIG>/Core"
)
|