Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Dastan

Pages: [1]
1
General / Re: How to compile for release version in Cmake?
« on: March 25, 2018, 05:03:41 am »
You set the CMAKE_BUILD_TYPE to release.

Ah. That worked. Thanks!

2
General / How to compile for release version in Cmake?
« on: March 24, 2018, 09:16:45 pm »
This probably has a simple answer but I couldn't really find much.
I'm using CLion and have the following code in CMakeLists.txt:
Quote

cmake_minimum_required(VERSION 3.2)
project(CityBuildingGame)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -w -mwindows")

set(OUTPUT_DIR ${PROJECT_SOURCE_DIR}/bin)     # specify output directory

set(SOURCE_FILES main.cpp)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_DIR})   # set output directory
add_executable(CityBuildingGame ${SOURCE_FILES})

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_modules")
find_package(SFML REQUIRED system window graphics network audio)
if (SFML_FOUND)
    include_directories(${SFML_INCLUDE_DIR})
    target_link_libraries(CityBuildingGame ${SFML_LIBRARIES})
endif()


But it seems that this only builds for the debug version since it throws an error when I delete one of the debug("-d") dll's. How do I specify it to build a release version?

Pages: [1]