Hello!
I'm working on transitioning my build workflow away from Xcode (6.x) to Cmake and the command line with an eye towards cross-platform builds.
I've managed to get my cmake generated make file to build, but it produces an executable that's missing my resources. I need help modifying my existing CMakeLists.txt file to build mac os x bundles (*.app), currently I'm only able to do this via Xcode.
Here's my current CmakeLists.txt
cmake_minimum_required(VERSION 3.2.2)
project(aegis CXX)
include_directories(include)
file(GLOB SOURCES "source/*.*")
file(GLOB_RECURSE RESOURCES RELATIVE resources/ *.*)
# Define sources and executable
set(EXECUTABLE_NAME "aegis")
add_executable(${EXECUTABLE_NAME} ${SOURCES})
# Detect and add SFML
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
#Find any version 2.X of SFML
#See the FindSFML.cmake file for additional details and instructions
find_package(SFML 2 REQUIRED system window graphics network audio)
if(SFML_FOUND)
include_directories(${SFML_INCLUDE_DIR})
target_link_libraries(${EXECUTABLE_NAME} ${SFML_LIBRARIES})
endif()
target_compile_features(aegis PRIVATE cxx_range_for)
I've done some research into Cpack and BundleUtilities, but I'm not sure if either are required. I'm looking for the most transparent straightforward solution, once I figure this first step out I'll move towards a more robust build.
Thanks in advance.