2017-12-06 03:26:15 +00:00
|
|
|
if(NOT WINDOWS_STORE)
|
2017-11-14 04:54:47 +00:00
|
|
|
cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # because of c++17
|
2017-02-24 08:28:44 +00:00
|
|
|
project(visigen)
|
|
|
|
|
2017-11-13 06:19:18 +00:00
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
2017-06-18 02:53:39 +00:00
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
2017-02-24 08:28:44 +00:00
|
|
|
if(MSVC)
|
2017-03-10 18:00:40 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
|
2017-02-24 08:28:44 +00:00
|
|
|
else()
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}\
|
2017-06-18 02:53:39 +00:00
|
|
|
-Wno-multichar -fno-exceptions -Wno-narrowing -Wno-nullability-completeness -Werror=return-type")
|
2017-02-24 08:28:44 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(APPLE)
|
2019-07-01 05:02:56 +00:00
|
|
|
set(PLAT_SRCS MainMac.mm glew.c)
|
2017-02-24 08:28:44 +00:00
|
|
|
set_source_files_properties(MainMac.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
|
2017-02-25 07:59:37 +00:00
|
|
|
elseif(WIN32)
|
|
|
|
set(PLAT_SRCS MainWin.cpp)
|
2017-02-26 02:43:27 +00:00
|
|
|
else()
|
|
|
|
set(PLAT_SRCS MainXlib.cpp)
|
2017-02-24 08:28:44 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
add_executable(visigen ${PLAT_SRCS}
|
|
|
|
VISIRenderer.cpp VISIRenderer.hpp
|
|
|
|
VISIBuilder.cpp VISIBuilder.hpp)
|
2018-01-02 01:04:23 +00:00
|
|
|
|
|
|
|
set_target_properties(visigen PROPERTIES COMPILE_DEFINITIONS URDE_DLPACKAGE="${URDE_DLPACKAGE}")
|
|
|
|
|
2018-10-16 03:17:02 +00:00
|
|
|
if(APPLE)
|
|
|
|
find_library(OPENGL_LIBRARY OpenGL)
|
|
|
|
set(PLAT_LIBS ${OPENGL_LIBRARY})
|
|
|
|
endif()
|
|
|
|
|
2019-06-12 02:05:17 +00:00
|
|
|
target_link_libraries(visigen logvisor athena-core zeus boo
|
|
|
|
xxhash ${ZLIB_LIBRARIES} lzokay hecl-light ${PLAT_LIBS})
|
2017-12-06 03:26:15 +00:00
|
|
|
endif()
|