Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
LiangliangNan committed Feb 8, 2024
1 parent 03c7ca4 commit 5bc3ed9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion 3rd_party/glew/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.12)

get_filename_component(MODULE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
set(PROJECT_NAME 3rd_${MODULE_NAME})
Expand Down
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ message("-- Setting C++11")
# Let's also add the version to the path to allow multiple versions of Easy3D in the same directory.

if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
if (WIN32 OR MSVC) # windows
if (WIN32) # windows
set(CMAKE_INSTALL_PREFIX "C:/Program Files/Easy3D/${Easy3D_VERSION}" CACHE PATH "Installation directory" FORCE)
elseif (APPLE) # macOS
elseif (APPLE) # macOS
set(CMAKE_INSTALL_PREFIX "/usr/local/Cellar/easy3d/${Easy3D_VERSION}" CACHE PATH "Installation directory" FORCE)
else () # Linux: different from tradition, let's keep everything together
else () # Linux: different from tradition, let's keep everything together
set(CMAKE_INSTALL_PREFIX "/usr/local/easy3d-${Easy3D_VERSION}" CACHE PATH "Installation directory" FORCE)
endif ()
endif ()
Expand Down Expand Up @@ -114,7 +114,7 @@ if (Easy3D_BUILD_SHARED_LIBS)
#Ref: Create dlls on Windows without declspec() using new CMake export all feature
# https://cmake.org/cmake/help/v3.4/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.html#prop_tgt:WINDOWS_EXPORT_ALL_SYMBOLS
# https://www.kitware.com/create-dlls-on-windows-without-declspec-using-new-cmake-export-all-feature/
if (WIN32 OR MSVC)
if (MSVC)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
endif ()
else ()
Expand Down Expand Up @@ -218,7 +218,7 @@ function(add_module module headers sources private_dependencies public_dependenc
SOVERSION ${Easy3D_MAJOR_VERSION}
VERSION ${Easy3D_VERSION}
)
if (WIN32 OR MSVC)
if (MSVC)
target_compile_definitions(easy3d_${module} PUBLIC NOMINMAX WIN32_LEAN_AND_MEAN VC_EXTRALEAN _CRT_SECURE_NO_WARNINGS _CRT_SECURE_NO_DEPRECATE) # get a clean windows
endif ()

Expand Down
4 changes: 2 additions & 2 deletions tutorials/Tutorial_203_Viewer_wxWidgets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ set(${PROJECT_NAME}_SOURCES
window.cpp
)

if (WIN32 OR MSVC)
set(${PROJECT_NAME}_RESOURCES "${CMAKE_CURRENT_LIST_DIR}/resources/sample.rc")
if (MSVC)
set(${PROJECT_NAME}_RESOURCES "${CMAKE_CURRENT_LIST_DIR}/resources/sample.rc")
add_executable(${PROJECT_NAME} ${${PROJECT_NAME}_HEADERS} ${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_RESOURCES}) # you can add "WIN32" to disable the console window
message(STATUS "Creating the wxWidgets viewer with a console window")
elseif (APPLE)
Expand Down

0 comments on commit 5bc3ed9

Please sign in to comment.