set(ASERVER_SOURCE_FILES
	stdafx.h
	main.cpp
	GameServer.h
	GameServer.cpp
	AceInterface.h
	AceInterface.cpp
	AceReportInterface.h
	AceReportInterface.cpp
	NetbarInterface.h
	NetbarInterface.cpp
	CurlHelper.h
	CurlHelper.cpp
)

set(ASERVER_PRECOMPILE_FILE
	stdafx.cpp
)

foreach(filename ${ASERVER_SOURCE_FILES})
	get_filename_component(ext ${filename} LAST_EXT ABSOLUTE)
	string(TOLOWER ${ext} ext_lower)
	if(${ext_lower} STREQUAL ".cpp" )
		set_source_files_properties(
			${filename}
			PROPERTIES
			COMPILE_FLAGS "/Yustdafx.h"
		)
	endif()
endforeach()
    
set_source_files_properties(${ASERVER_PRECOMPILE_FILE}
	PROPERTIES
	COMPILE_FLAGS "/Ycstdafx.h"
)

add_executable(aServer
	${ASERVER_SOURCE_FILES}
	${ASERVER_PRECOMPILE_FILE}
)

target_include_directories(aServer
PRIVATE
	${ACE_SERVER_DIR}/include
	${RAPIDJSON_INCLUDE_DIRS}
	${GAME_PROTO_DIR}
	../../libTinyEncrypt
)

target_link_libraries(aServer
PRIVATE
	aGameProto
	cyclone::cyclone
	ws2_32.lib
	shlwapi.lib
	CURL::libcurl_static
	libTinyEncrypt
)
