diff --git a/CMakeLists.txt b/CMakeLists.txt index c8505d1e..582041c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,9 @@ -cmake_minimum_required(VERSION 3.22) +cmake_minimum_required(VERSION 3.8) project(cmake) +cmake_policy(SET CMP0069 NEW) + # ***************************************************************************** # Append cmake search path # ***************************************************************************** diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index dd530cfd..c195422b 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -2,6 +2,8 @@ # ***************************************************************************** # Project canary map editor # ***************************************************************************** +cmake_minimum_required(VERSION 3.8) + project(canary-map-editor) find_package(asio CONFIG REQUIRED) @@ -55,19 +57,6 @@ else() log_option_disabled("openmp") endif() -# === IPO === -check_ipo_supported(RESULT result OUTPUT output) -if(result) - set_property(TARGET ${PROJECT_NAME} PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE) -else() - message(WARNING "IPO is not supported: ${output}") -endif() - -# === PRECOMPILED HEADER === -target_precompile_headers(${PROJECT_NAME} PRIVATE main.h) - - - target_sources(${PROJECT_NAME} PRIVATE about_window.cpp @@ -178,14 +167,12 @@ target_sources(${PROJECT_NAME} target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/source - ${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR} ) target_link_libraries(${PROJECT_NAME} PRIVATE - ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${ZLIB_LIBRARIES} fmt::fmt @@ -194,6 +181,7 @@ target_link_libraries(${PROJECT_NAME} pugixml::pugixml wx::base wx::core wx::net wx::gl wx::html wx::aui wx::adv liblzma::liblzma + OpenGL::GL protobuf ) diff --git a/source/protobuf/CMakeLists.txt b/source/protobuf/CMakeLists.txt index c2060b1d..a83cfea6 100644 --- a/source/protobuf/CMakeLists.txt +++ b/source/protobuf/CMakeLists.txt @@ -1,6 +1,8 @@ # ***************************************************************************** # Project protobuf # ***************************************************************************** +cmake_minimum_required(VERSION 3.8) + project(protobuf) find_package(Protobuf REQUIRED)