Skip to content

Commit

Permalink
fix: build linux
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas committed Jan 30, 2024
1 parent 767f65a commit 8f9d3ca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
# *****************************************************************************
Expand Down
18 changes: 3 additions & 15 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# *****************************************************************************
# Project canary map editor
# *****************************************************************************
cmake_minimum_required(VERSION 3.8)

project(canary-map-editor)

find_package(asio CONFIG REQUIRED)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
)

Expand Down
2 changes: 2 additions & 0 deletions source/protobuf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# *****************************************************************************
# Project protobuf
# *****************************************************************************
cmake_minimum_required(VERSION 3.8)

project(protobuf)

find_package(Protobuf REQUIRED)
Expand Down

0 comments on commit 8f9d3ca

Please sign in to comment.