diff --git a/CMakeLists.txt b/CMakeLists.txt index 8fb092dc6..80f4afa9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,10 +30,7 @@ if(VOXELENGINE_BUILD_APPDIR) endif() if(MSVC) - target_compile_options( - VoxelEngine - PRIVATE /source-charset:UTF-8 /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR - /W4) + else() target_compile_options( VoxelEngine diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9c0e69121..17f70c5aa 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -66,6 +66,7 @@ target_include_directories( VoxelEngineSrc PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} PRIVATE ${LUA_INCLUDE_DIR}) + target_link_libraries( VoxelEngineSrc PRIVATE glfw @@ -80,3 +81,7 @@ target_link_libraries( PUBLIC glm::glm # Need public for src/delegates.hpp, which including to # main.cpp ) + +target_compile_options( + VoxelEngineSrc PUBLIC /source-charset:UTF-8 + /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR /W4) diff --git a/vctest/CMakeLists.txt b/vctest/CMakeLists.txt index 961bababd..5865ea0c0 100644 --- a/vctest/CMakeLists.txt +++ b/vctest/CMakeLists.txt @@ -6,8 +6,7 @@ add_executable(vctest ${CMAKE_CURRENT_LIST_DIR}/main.cpp) target_include_directories(vctest PRIVATE ${CMAKE_SOURCE_DIR}/src) if(MSVC) - target_compile_options( - vctest PRIVATE /W4) + target_compile_options(vctest PRIVATE /W4) else() target_compile_options( vctest